Files
OpenFOAM-12/tutorials/modules/incompressibleFluid/nonConformalChannel/Allrun
Henry Weller ca89189ecd solvers::incompressibleFluid: New solver module for incompressible fluid flow
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations.  Replaces pimpleFoam, pisoFoam and simpleFoam and all
the corresponding tutorials have been updated and moved to
tutorials/modules/incompressibleFluid.

Class
    Foam::solvers::incompressibleFluid

Description
    Solver module for steady or transient turbulent flow of incompressible
    isothermal fluids with optional mesh motion and change.

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

    Optional fvModels and fvConstraints are provided to enhance the simulation
    in many ways including adding various sources, constraining or limiting
    the solution.

    Reference:
    \verbatim
        Greenshields, C. J., & Weller, H. G. (2022).
        Notes on Computational Fluid Dynamics: General Principles.
        CFD Direct Ltd.: Reading, UK.
    \endverbatim

SourceFiles
    incompressibleFluid.C

See also
    Foam::solvers::fluidSolver
    Foam::solvers::isothermalFluid
2022-08-08 22:46:51 +01:00

47 lines
1.4 KiB
Bash
Executable File

#!/bin/sh
cd "${0%/*}" || exit 1
. $WM_PROJECT_DIR/bin/tools/RunFunctions
mesh()
{
runApplication -s $1 blockMesh -dict system/blockMeshDict.$1
}
run()
{
runApplication -s $1 $(getApplication)
mv postProcessing/inletFlowRate postProcessing/inletFlowRate.$1
mv postProcessing/outletFlowRate postProcessing/outletFlowRate.$1
}
if isTest $@
then
foamDictionary -entry startFrom -set startTime system/controlDict
fi
mesh AMI
run AMI
mesh nonConformalCyclic
runApplication -s nonConformalCyclic createNonConformalCouples -overwrite nonCoupleUp nonCoupleDown
run nonConformalCyclic
inletFlowRateAMI=postProcessing/inletFlowRate.AMI/0/surfaceFieldValue.dat
outletFlowRateAMI=postProcessing/outletFlowRate.AMI/0/surfaceFieldValue.dat
inletFlowRateNonConformalCyclic=postProcessing/inletFlowRate.nonConformalCyclic/0/surfaceFieldValue.dat
outletFlowRateNonConformalCyclic=postProcessing/outletFlowRate.nonConformalCyclic/0/surfaceFieldValue.dat
gnuplot << EOF
set terminal postscript eps color enhanced
set output "error.eps"
set xlabel "Time (s)"
set ylabel "Inlet-Outlet Conservation Error (%)"
plot \
"< paste $inletFlowRateAMI $outletFlowRateAMI" \
us 1:(100*(\$4+\$2)/\$2) every ::1 w l t "AMI" , \
"< paste $inletFlowRateNonConformalCyclic $outletFlowRateNonConformalCyclic" \
us 1:(100*(\$4+\$2)/\$2) every ::1 w l t "nonConformalCyclic"
EOF