Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions test/tests/multiapps/shell_tube_heat_exchanger/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Shell and tube heat exchanger

Here we solve the preCICE [shell and tube heat exchanger](https://precice.org/tutorials-heat-exchanger.html) problem using Hippo.

![Shell and tube heat exchanger](https://precice.org/images/tutorials-heat-exchanger-visualization.png)

The fluid and solid meshes are copied from the tutorial with the solid mesh already converted to the Exodus II format for MOOSE. The case is run using FFTB (heat flux from fluid to solid, wall temperature from solid to fluid) coupling, meaning the solid is run transient. To speed up convergence, the $c_p$ is decreased initially.

`download-meshes.sh` shell script downloads and decompresses the OpenFOAM meshes, while `prep.sh` takes command line arguments to set the write interval and end time of the simulations.

There are two tests:
- **Short test:** run for 10 seconds as part of normal CI pipeline
- **Heavy test:** run for full 500 seconds and can be activated using the `--heavy` option for the `run_tests` executable.
24 changes: 24 additions & 0 deletions test/tests/multiapps/shell_tube_heat_exchanger/download-meshes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh


echo "This tutorial is based on a case prepared with SimScale."
echo "Since the mesh files are several MB large, we don't store them in the Git repository."
echo "This script downloads and extracts the missing files."
echo ""

echo "Downloading and extracting the Inner-Fluid mesh..."
wget -nv -O - https://syncandshare.lrz.de/dl/fiNsYGC1DKzgio4jS5NhsXg7/polyMesh.org.tar.gz | tar -xzv -C fluid_inner/constant
mv fluid_inner/constant/polyMesh.org fluid_inner/constant/polyMesh
gzip -d -q fluid_inner/constant/polyMesh/*


echo "Downloading and extracting the Outer-Fluid mesh..."
wget -nv -O - https://syncandshare.lrz.de/dl/fiEZRQ8rcVWRkoyZvANim1R1/polyMesh.org.tar.gz | tar -xzv -C fluid_outer/constant
mv fluid_outer/constant/polyMesh.org fluid_outer/constant/polyMesh
gzip -d -q fluid_outer/constant/polyMesh/*

echo "Update boundary type"
sed -i 's/mapped/wall/g' fluid_inner/constant/polyMesh/boundary
sed -i 's/mapped/wall/g' fluid_outer/constant/polyMesh/boundary

echo "Completed."
33 changes: 33 additions & 0 deletions test/tests/multiapps/shell_tube_heat_exchanger/fluid_inner/0/T
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}

dimensions [0 0 0 1 0 0 0];

internalField uniform 300;

boundaryField
{
outlet
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform 283;
}
interface
{
type fixedValue;
value uniform 283;
}
adiabatic
{
type zeroGradient;
}
}
34 changes: 34 additions & 0 deletions test/tests/multiapps/shell_tube_heat_exchanger/fluid_inner/0/U
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
outlet
{
type zeroGradient;
}
inlet
{
type fixedValue;
value uniform (0 0 -0.002);
}
interface
{
type fixedValue;
value uniform (0 0 0);
}
adiabatic
{
type fixedValue;
value uniform (0 0 0);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alphat;
}

dimensions [1 -1 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
".*"
{
type fixedValue;
value uniform 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object epsilon;
}

dimensions [0 2 -3 0 0 0 0];

internalField uniform 1e-6;

boundaryField
{
".*"
{
type fixedValue;
value uniform 1e-6;
}
}
20 changes: 20 additions & 0 deletions test/tests/multiapps/shell_tube_heat_exchanger/fluid_inner/0/k
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
".*"
{
type fixedValue;
value uniform 0;
}
}
20 changes: 20 additions & 0 deletions test/tests/multiapps/shell_tube_heat_exchanger/fluid_inner/0/nut
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object nut;
}

dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
".*"
{
type fixedValue;
value uniform 0;
}
}
35 changes: 35 additions & 0 deletions test/tests/multiapps/shell_tube_heat_exchanger/fluid_inner/0/p
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 101325;

boundaryField
{
outlet
{
type calculated;
value uniform 101325;
}
inlet
{
type calculated;
value uniform 101325;
}
interface
{
type calculated;
value uniform 101325;
}
adiabatic
{
type calculated;
value uniform 101325;
}
}
36 changes: 36 additions & 0 deletions test/tests/multiapps/shell_tube_heat_exchanger/fluid_inner/0/p_rgh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 101325;

boundaryField
{
outlet
{
type fixedValue;
value uniform 101325;
}
inlet
{
type zeroGradient;
}
interface
{
type fixedFluxPressure;
gradient uniform 0;
value uniform 101325;
}
adiabatic
{
type fixedFluxPressure;
gradient uniform 0;
value uniform 101325;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions

cleanCase
rm -f validation/*.eps

#------------------------------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
set -e -u

. ../../tools/cleaning-tools.sh

clean_openfoam .
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
object g;
}

dimensions [0 1 -2 0 0 0 0];

value (0.0 0.0 0.0);
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object thermophysicalProperties;
}

dpdt no;

thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState perfectFluid;
specie specie;
energy sensibleEnthalpy;
}

mixture
{
specie
{
nMoles 1;
molWeight 18;
}
equationOfState
{
R 3000;
rho0 1027;
}
thermodynamics
{
Cp 4195;
Hf 0;
}
transport
{
mu 3.645e-4;
Pr 2.289;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FoamFile {
version 2.0;
format ascii;
class dictionary;
object turbulenceProperties;
}

simulationType laminar;
10 changes: 10 additions & 0 deletions test/tests/multiapps/shell_tube_heat_exchanger/fluid_inner/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -e -u

. ../../tools/log.sh
exec > >(tee --append "$LOGFILE") 2>&1

../../tools/run-openfoam.sh "$@"
. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs

close_log
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FoamFile {
version 2.0;
format ascii;
class dictionary;
object controlDict;
}

solver fluid;

startFrom startTime;

stopAt endTime;

writeFormat ascii;

writePrecision 12;

// writeCompression on;

timeFormat general;

timePrecision 12;

deltaT 1.;

startTime 0.0;

writeInterval 50;

endTime 500;

writeControl timeStep;
Loading