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 boundaryField
{ {
#includeEtc "caseDicts/setConstraintTypes"
surface surface
{ {
type coupledTemperature; type coupledTemperature;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -8,13 +8,6 @@ runApplication -s fluid blockMesh -region fluid
runApplication decomposePar -region fluid -noFields 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 runParallel extrudeToRegionMesh -region fluid -overwrite
runApplication -s fields decomposePar -fields -copyZero runApplication -s fields decomposePar -fields -copyZero

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,6 +9,7 @@ FoamFile
{ {
format ascii; format ascii;
class volScalarField; class volScalarField;
location "0/film";
object p; object p;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -19,6 +20,8 @@ internalField uniform 1e5;
boundaryField boundaryField
{ {
#includeEtc "caseDicts/setConstraintTypes"
surface surface
{ {
type mappedFilmPressure; 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 -s fluid blockMesh -region fluid
runApplication decomposePar -region fluid -noFields
# Create a set for the bits of the mesh that are not boxes # 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 # 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 # 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" printf "\n%s\n" "Creating files for paraview post-processing"
paraFoam -touchAll paraFoam -touchAll
echo echo
runApplication $(getApplication)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------