tutorials/multiRegion/film: More parallel examples

This commit is contained in:
Will Bainbridge
2024-07-02 13:17:11 +01:00
parent 970b6ff7d7
commit d5771b21c5
25 changed files with 110 additions and 24 deletions

View File

@ -20,6 +20,8 @@ internalField uniform 300;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
surface
{
type coupledTemperature;

View File

@ -20,6 +20,8 @@ internalField uniform (0 0 0);
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
surface
{
type filmSurfaceVelocity;

View File

@ -20,6 +20,8 @@ internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
surface
{
type zeroGradient;

View File

@ -9,6 +9,7 @@ FoamFile
{
format ascii;
class volScalarField;
location "0/film";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -19,6 +20,8 @@ internalField uniform 1e5;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
surface
{
type mappedFilmPressure;

View File

@ -9,7 +9,7 @@ FoamFile
{
format ascii;
class volScalarField;
location "0";
location "0/fluid";
object H2O;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -20,6 +20,8 @@ internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
film
{
type zeroGradient;

View File

@ -9,7 +9,7 @@ FoamFile
{
format ascii;
class volScalarField;
location "0";
location "0/fluid";
object N2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -20,6 +20,8 @@ internalField uniform 0.77;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
film
{
type zeroGradient;

View File

@ -9,7 +9,7 @@ FoamFile
{
format ascii;
class volScalarField;
location "0";
location "0/fluid";
object O2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -20,6 +20,8 @@ internalField uniform 0.23;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
film
{
type zeroGradient;

View File

@ -9,7 +9,7 @@ FoamFile
{
format ascii;
class volScalarField;
location "0";
location "0/fluid";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -20,6 +20,8 @@ internalField uniform 300;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
film
{
type coupledTemperature;

View File

@ -9,7 +9,7 @@ FoamFile
{
format ascii;
class volVectorField;
location "0";
location "0/fluid";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -20,6 +20,8 @@ internalField uniform (0 0 0);
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
film
{
type mappedValue;

View File

@ -9,7 +9,7 @@ FoamFile
{
format ascii;
class volScalarField;
location "0";
location "0/fluid";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -20,6 +20,8 @@ internalField uniform 1e5;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
film
{
type calculated;

View File

@ -9,7 +9,7 @@ FoamFile
{
format ascii;
class volScalarField;
location "0";
location "0/fluid";
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -20,6 +20,8 @@ internalField uniform 1e5;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
film
{
type fixedFluxPressure;

View File

@ -8,13 +8,6 @@ runApplication -s fluid blockMesh -region fluid
runApplication decomposePar -region fluid -noFields
# Create a set for the bits of the mesh that are not boxes
runParallel topoSet -region fluid
# Create the boxes and add their surfaces to the boxes patch
runParallel subsetMesh notBoxes -region fluid -patch film -overwrite -noFields
# Create the film mesh
runParallel extrudeToRegionMesh -region fluid -overwrite
runApplication -s fields decomposePar -fields -copyZero

View File

@ -9,7 +9,7 @@ FoamFile
{
format ascii;
class volScalarField;
location "0";
location "0/VoF";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -20,6 +20,8 @@ internalField uniform 300;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
film
{
type coupledTemperature;

View File

@ -9,7 +9,7 @@ FoamFile
{
format ascii;
class volVectorField;
location "0";
location "0/VoF";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -20,6 +20,8 @@ internalField uniform (0 0 0);
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
film
{
type mappedValue;

View File

@ -9,7 +9,7 @@ FoamFile
{
format ascii;
class volScalarField;
location "0";
location "0/VoF";
object alpha.liquid;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -20,6 +20,8 @@ internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
film
{
type zeroGradient;

View File

@ -9,7 +9,7 @@ FoamFile
{
format ascii;
class volScalarField;
location "0";
location "0/VoF";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -20,6 +20,8 @@ internalField uniform 1e5;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
film
{
type calculated;

View File

@ -9,7 +9,7 @@ FoamFile
{
format ascii;
class volScalarField;
location "0";
location "0/VoF";
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -20,6 +20,8 @@ internalField uniform 1e5;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
film
{
type fixedFluxPressure;

View File

@ -20,6 +20,8 @@ internalField uniform 300;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
surface
{
type coupledTemperature;

View File

@ -20,6 +20,8 @@ internalField uniform (0 0 0);
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
surface
{
type filmSurfaceVelocity;

View File

@ -20,6 +20,8 @@ internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
surface
{
type zeroGradient;

View File

@ -9,6 +9,7 @@ FoamFile
{
format ascii;
class volScalarField;
location "0/film";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -19,6 +20,8 @@ internalField uniform 1e5;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
surface
{
type mappedFilmPressure;

View File

@ -0,0 +1,23 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication -s VoF blockMesh -region VoF
runApplication decomposePar -region VoF -noFields
runParallel extrudeToRegionMesh -region VoF -overwrite
runApplication -s fields decomposePar -fields -copyZero
runParallel $(getApplication)
runApplication reconstructPar -allRegions
printf "\n%s\n" "Creating files for paraview post-processing"
paraFoam -touchAll
echo
#------------------------------------------------------------------------------

View File

@ -0,0 +1,22 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "system";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
method scotch;
// ************************************************************************* //

View File

@ -6,19 +6,25 @@ cd ${0%/*} || exit 1 # Run from this directory
runApplication -s fluid blockMesh -region fluid
runApplication decomposePar -region fluid -noFields
# Create a set for the bits of the mesh that are not boxes
runApplication topoSet -region fluid
runParallel topoSet -region fluid
# Create the boxes and add their surfaces to the boxes patch
runApplication subsetMesh notBoxes -region fluid -patch film -overwrite -noFields
runParallel subsetMesh notBoxes -region fluid -patch film -overwrite -noFields
# Create the film mesh
runApplication extrudeToRegionMesh -region fluid -overwrite
runParallel extrudeToRegionMesh -region fluid -overwrite
runApplication -s fields decomposePar -fields -copyZero
runParallel $(getApplication)
runApplication reconstructPar -allRegions
printf "\n%s\n" "Creating files for paraview post-processing"
paraFoam -touchAll
echo
runApplication $(getApplication)
#------------------------------------------------------------------------------