Use on OpenFOAM¶
Export UNV file Mesh_1 and copy in /hgasca/OpenFOAM/run/case/
ideasUnvToFoam Mesh_1.unv checkMesh
Go to /case/constant/polyMesh and open bondary file:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format binary;
class polyBoundaryMesh;
location "1e-05/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
9
(
frontAndBack_pos
{
type wedge;
inGroups List<word> 1(wedge);
nFaces 76728;
startFace 151207;
}
inlet
{
type patch;
nFaces 61;
startFace 227935;
}
wall
{
type wall;
inGroups List<word> 1(wall);
nFaces 1559;
startFace 227996;
}
positive_pres
{
type wall;
inGroups List<word> 1(wall);
nFaces 58;
startFace 229555;
}
negative_pres
{
type wall;
inGroups List<word> 1(wall);
nFaces 55;
startFace 229613;
}
moving_wall
{
type wall;
inGroups List<word> 1(wall);
nFaces 1200;
startFace 229668;
}
outlet
{
type patch;
nFaces 55;
startFace 230868;
}
Axis
{
type patch;
nFaces 2154;
startFace 2400868;
}
frontAndBack_neg
{
type wedge;
inGroups List<word> 1(wedge);
nFaces 76728;
startFace 230923;
}
)
// ************************************************************************* //
The kind of boundaries are as appear before
In the next Step collapseEdges the Axis boundary could be reduced and it will appear with zero nFaces, you must delete this boundary in the new time generated folder i.e 5e-06/polyMesh and to change the number of boundaries from 9 to 8 for this case
collapseEdges
it creates a new time i.e case/5e-06. Then replace /constant/polyMesh Mesh by new_time/polyMesh mesh and review names of boundaries. Copy the case/0 files into the new_time folder.
openFoam Flies¶
Files Folder 5e-06¶
constant folder¶
Pay special attention to transportProperties
system folder¶
Here there are important files: - collapseDict is necessary to run the collapseDict command. - decomposeParDict sets the parallel running decomposition. - setFieldsDict sets the phases into the geometry as an initial conditions. The subsecuent time steps must maintain the phase equilibrium in other way the run could diverge.
The last three must be generated by:
foamGet streamlines
foamGet probes
foamGet residuals
Ann edit to customize the parameters. Then in controlDict append:
functions
{
#includeFunc streamlines
#includeFunc residuals
#includeFunc probes.cfg
}
The results of them will be find in the case/postProcessinf folder
Actions¶
checkMesh
If errors review your mesh know use the solver pimpleFOAM with one or more processors
decomposePar
checkMesh
renumberMesh
Then in the case folder create a file called hostfile with this content:
localhost slots=8
The number of slots corresponds to the procesors to be use. Run the parallel processes with:
mpirun -hostfile hostfile -np 8 pimpleFoam -parallel >log
or
mpirun.openmpi -hostfile hostfile -np 8 pimpleFoam -parallel >log
Depending on your system configuration.
And finally you could review the convergence by:
foamMonitor -logscale ./postProcessing/residuals/5e-06/residuals.dat