Files
OpenFOAM-12/tutorials/modules/fluid/shockTube/createGraphs
Henry Weller fe5a991ade solvers::shockFluid: New solver module for density-based solution of compressible flow
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations.  Replaces rhoCentralFoam and all the corresponding
tutorials have been updated and moved to tutorials/modules/shockFluid.

Unlike rhoCentralFoam shockFluid supports mesh refinement/unrefinement, topology
change, run-time mesh-to-mesh mapping, load-balancing in addition to general
mesh-motion.

The tutorials/modules/shockFluid/movingCone case has been updated to demonstrate
run-time mesh-to-mesh mapping mesh topology change based on the
tutorials/modules/incompressibleFluid/movingCone.  shockFluid s

Description
    Solver module for density-based solution of compressible flow

    Based on central-upwind schemes of Kurganov and Tadmor with support for
    mesh-motion and topology change.

    Reference:
    \verbatim
        Greenshields, C. J., Weller, H. G., Gasparini, L.,
        & Reese, J. M. (2010).
        Implementation of semi‐discrete, non‐staggered central schemes
        in a colocated, polyhedral, finite volume framework,
        for high‐speed viscous flows.
        International journal for numerical methods in fluids, 63(1), 1-21.
    \endverbatim

SourceFiles
    shockFluid.C

See also
    Foam::solvers::fluidSolver
    Foam::solvers::incompressibleFluid
2023-01-18 14:10:48 +00:00

50 lines
997 B
Bash
Executable File

#!/bin/sh
if ! which gnuplot > /dev/null 2>&1
then
echo 'gnuplot not found - skipping graph creation' >&2
exit 1
fi
time=$(foamListTimes -latestTime)
graphFile=postProcessing/sample/$time/data.xy
gnuplot<<EOF
set terminal postscript eps color enhanced font "Helvetica,20"
set output 'T.eps'
set xlabel 'l (m)'
set ylabel 'T (K)'
set ytics nomirror
set key center
plot "$graphFile" u 1:2 w l t 'T'
EOF
gnuplot<<EOF
set terminal postscript eps color enhanced font "Helvetica,20"
set output 'U.eps'
set xlabel 'l (m)'
set ylabel 'T (K)'
set ytics nomirror
set key center
plot "$graphFile" u 1:3 w l t 'U'
EOF
gnuplot<<EOF
set terminal postscript eps color enhanced font "Helvetica,20"
set output 'p.eps'
set xlabel 'l (m)'
set ylabel 'p (Pa)'
set ytics nomirror
set key center
plot "$graphFile" u 1:4 w l t 'p'
EOF
#------------------------------------------------------------------------------