Difference between revisions of "User:Bfiedler/DraftCoriolisForce"
From OpenFOAMWiki
Line 10: | Line 10: | ||
cp -r buoyantBoussinesqPimpleFoam $WM_PROJECT_USER_DIR/applications/solvers/my_tornado | cp -r buoyantBoussinesqPimpleFoam $WM_PROJECT_USER_DIR/applications/solvers/my_tornado | ||
− | cp -r buoyantBoussinesqSimpleFoam $WM_PROJECT_USER_DIR/applications/solvers/. | + | cp -r buoyantBoussinesqPimpleFoam $WM_PROJECT_USER_DIR/applications/solvers/my_tornado |
+ | |||
+ | In its new location, we need to copy a file that was shared in the the previous location: | ||
+ | cp - buoyantBoussinesqSimpleFoam/readTransportProperties.H $WM_PROJECT_USER_DIR/applications/solvers/my_tornado/. | ||
cd $WM_PROJECT_USER_DIR/applications/solvers | cd $WM_PROJECT_USER_DIR/applications/solvers | ||
Line 35: | Line 38: | ||
ls $FOAM_USER_APPBIN | ls $FOAM_USER_APPBIN | ||
+ | |||
+ | === Add the Coriolis Force === | ||
+ | |||
+ | Add a single line UEqn.H, so that the top of the file is: | ||
+ | |||
+ | <pre> // Solve the momentum equation | ||
+ | |||
+ | fvVectorMatrix UEqn | ||
+ | ( | ||
+ | fvm::ddt(U) | ||
+ | + fvm::div(phi, U) | ||
+ | + turbulence->divDevReff(U) | ||
+ | + (2*myVector ^ U) // Coriolis force | ||
+ | );</pre> |
Revision as of 17:38, 10 January 2011
if you do not have a solver directory in $WM_PROJECT_USER_DIR do
mkdir $WM_PROJECT_USER_DIR/applications/solvers
get the original tutorial code for
cd $FOAM_SOLVERS cd heatTransfer cp -r buoyantBoussinesqPimpleFoam $WM_PROJECT_USER_DIR/applications/solvers/my_tornado
cp -r buoyantBoussinesqPimpleFoam $WM_PROJECT_USER_DIR/applications/solvers/my_tornado
In its new location, we need to copy a file that was shared in the the previous location: cp - buoyantBoussinesqSimpleFoam/readTransportProperties.H $WM_PROJECT_USER_DIR/applications/solvers/my_tornado/.
cd $WM_PROJECT_USER_DIR/applications/solvers ls -l cd my_tornado
if you have this file, delete it:
rm buoyantBoussinesqPimpleFoam.dep
cd Make
If you have this directory, then delete it:
rm -rf linux64GccDPOpt
and edit the file named "files" to this:
my_tornado.C
EXE = $(FOAM_APPBIN)/my_tornado
cd .. wmake
You may get a few warning. But if all has went wall you see the app my_tornado (though without any ability yet to make a tornado) :
ls $FOAM_USER_APPBIN
Add the Coriolis Force
Add a single line UEqn.H, so that the top of the file is:
// Solve the momentum equation fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) + turbulence->divDevReff(U) + (2*myVector ^ U) // Coriolis force );