Previous: Running the simulation Up: Running the simulation Next: Results evaluation
This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.
Solver setup
- Initial and boundary conditions as well as the numerical schemes and linear solvers are set.
- The initial and boundary condition values for turbulent kinetic energy and specific dissipation have been computed using the following relations:
- The turbulence intensity is usually set to 2 – 5%.
- The turbulent length scale is related to the hydraulic parameter by
(17.4) |
- can be e.g. the length or width of the computational domain.
- The file controlDict contains a reference to the function object, that is going to compute drag and lift coefficients during the computation.
- The function object is in the auxiliary file aeroCoeffs in system directory.
- Reference to function object setup should be located at the end of controlDict.
functions { #include "aeroCoeffs" }
- Function object aeroCoeffs setup:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ forces { type forceCoeffs; functionObjectLibs ( "libforces.so" ); writeControl timeStep; writeInterval 1; // output interval patches ( "car.*" ); // surfaces from which to compute Cd and Cl pName p; UName U; rho rhoInf; // reference density (incompressible case) log true; // make log file with output?. rhoInf 1; // reference density value liftDir (0 1 0); // direction of lift dragDir (1 0 0); // direction of drag CofR (-13.4 0 0); // moment of force reference centre pitchAxis (0 0 1); // rotation axis vector (moment computation) magUInf 20; // mean flow velocity.. lRef 3.5; // reference lengt (moment computation) Aref 2.24; // reference area (lift and drag computation) } // ************************************************************************* //
- All the function object parameters are described in the listing above.
- The type of a function object is defined by its name. It is forceCoeffs in our case (computation of lift and drag coefficients).
- The parameter functionObjectLibs loads the library in which the chosen function object resides – into which it has been compiled.
- Now it is the right moment to set the inlet velocity profile.
- First we need to create file 0/U from 0/U.org.
# cp -f 0/U.org 0/U - Run the command setVelocityProfile, that sets the parabolic velocity profile in the inlet.
# setVelocityProfile - One can look into boundary condition for velocity (file U in the directory 0 ) and see what happened.
- The test case will be computed in parallel on two CPUs.
- In the file system/decomposeParDict set the simple method of decomposition, set the division along the axis and the number of subdomains to two.
- Run the utility decomposePar -force , which decomposes the case to two CPUs. The switch -force removes any existing directories processor*.
- And now run the computation:
# mpiexec -np 2 simpleFoam -parallel > log &
Previous: Running the simulation Up: Running the simulation Next: Results evaluation