mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
rhoSimpleFoam now instantiates the lower-level fluidThermo which instantiates
either a psiThermo or rhoThermo according to the 'type' specification in
thermophysicalProperties, e.g.
thermoType
{
type hePsiThermo;
mixture pureMixture;
transport sutherland;
thermo janaf;
equationOfState perfectGas;
specie specie;
energy sensibleInternalEnergy;
}
instantiates a psiThermo for a perfect gas with JANAF thermodynamics, whereas
thermoType
{
type heRhoThermo;
mixture pureMixture;
properties liquid;
energy sensibleInternalEnergy;
}
mixture
{
H2O;
}
instantiates a rhoThermo for water, see new tutorial
compressible/rhoSimpleFoam/squareBendLiq.
In order to support complex equations of state the pressure can no longer be
unlimited and rhoSimpleFoam now limits the pressure rather than the density to
handle start-up more robustly.
For backward compatibility 'rhoMin' and 'rhoMax' can still be used in the SIMPLE
sub-dictionary of fvSolution which are converted into 'pMax' and 'pMin' but it
is better to set either 'pMax' and 'pMin' directly or use the more convenient
'pMinFactor' and 'pMinFactor' from which 'pMax' and 'pMin' are calculated using
the fixed boundary pressure or reference pressure e.g.
SIMPLE
{
nNonOrthogonalCorrectors 0;
pMinFactor 0.1;
pMaxFactor 1.5;
transonic yes;
consistent yes;
residualControl
{
p 1e-3;
U 1e-4;
e 1e-3;
"(k|epsilon|omega)" 1e-3;
}
}
Overview ======== + This is a template case with single inlet and outlet + Setup to run the compressible rhoSimpleFoam solver + The case is designed to be meshed with snappyHexMesh + snappyHexMesh is setup to use a single trisurface file named CAD.obj + Copy the CAD.obj file to the constant/triSurface directory + The CAD.obj should contain an inlet and outlet region to create the relevant patches in the mesh Background Mesh =============== + The user should establish the bounds of their CAD.obj file + The blockMeshDict file contains a backgroundMesh subditionary + Set xMin, xMax, etc to be beyond the CAD.obj bounds + Set background mesh density with xCells, yCells, zCells + Run blockMesh Background Mesh (alternative) ============================= + The user can adopt the background mesh patches in the mesh + For example, the background mesh can provide external patches of an external flow + An alternative blockMeshDict file is set up for this: blockMeshDict.extPatches + Simply copy blockMeshDict.extPatches to blockMeshDict and edit inlet, outlet patches accordingly Castellated Mesh ================ + In the snappyHexMeshDict file, replace <inletPatch> with the name of the inlet region in the CAD.obj file + Replace <outletPatch> with the name of the outlet region + run snappyHexMesh to obtain a castellatedMesh + Review the mesh; modify refinement levels and regenerate the mesh as required (levels are set in refinementSurfaces and refinementRegions) Snapped Mesh ============ + In snappyHexMeshDict, set castellatedMesh off; snap on; + Run the snapping phase of snappyHexMesh + Review the mesh Layers ====== + To add layers to the mesh along wall boundary patches... + Switch on addLayers; switch snap off; + Run snappyHexMesh + The number of layers can be changed by modifying nSurfaceLayers Initialisation ============== + In the field files in the 0 directory, set inlet values + For example, in 0/U, set the inlet velocity Uinlet + Set the viscosity in constant/transportProperties