openfoam/tutorials/compressible/rhoPimpleFoam/RAS/externalCoupledSquareBendLiq/Allrun
Mark Olesen 550e47629b ENH: configurable output temperature for externalCoupled mixed T BC (#1072)
- Uses the user-specified value for outputTemperature:

  {
      type  externalCoupledTemperature;
      outputTemperture  fluid;  // or wall;
  }

  Otherwises uses 'wall' as a default (for compatibility) and emits a
  warning.

  The T.out header now reflects the type of output. Eg,

     # Values: area Tfluid qDot htc
2018-12-02 17:35:48 +01:00

82 lines
1.8 KiB
Bash
Executable File

#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
./Allrun.pre
unset coupling parallel testCreate
isTrue -dict controls -entry coupling && coupling=true
isTrue -dict controls -entry parallel && parallel=true
# isTrue -dict controls -entry testCreate && testCreate=true
# Remove lock file on interrupt
trap '\rm -f comms/OpenFOAM.lock 2>/dev/null' INT
# Decompose
if [ "$parallel" = true ]
then
runApplication decomposePar
# ## Can verify parallel operation of createExternalCoupledPatchGeometry
if [ "$coupling" = true ] && [ "$testCreate" = true ]
then
\rm -f log.createExternalCoupledPatchGeometry
runParallel createExternalCoupledPatchGeometry \
coupleGroup \
-commsDir $PWD/comms
fi
fi
if [ "$coupling" = true ]
then
echo "Running with external coupling"
# Controls
cat << CONTROLS >| externalCoupled.control
//- Overrides for externalCoupled
enabled true;
CONTROLS
# Run OpenFOAM, with externalCoupled enabled
if [ "$parallel" = true ]
then
runParallel $(getApplication) &
else
runApplication $(getApplication) &
fi
# Simulated external solver
runApplication ./externalSolver
else
echo "Running without external coupling"
# Controls
cat << CONTROLS >| externalCoupled.control
//- Overrides for externalCoupled
enabled false;
CONTROLS
# Run OpenFOAM, with externalCoupled disabled
if [ "$parallel" = true ]
then
runParallel $(getApplication)
else
runApplication $(getApplication)
fi
fi
# Reconstruct
if [ "$parallel" = true ]
then
runApplication reconstructPar
fi
#------------------------------------------------------------------------------