Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
8 changes: 7 additions & 1 deletion Data/Templates/case/Allrun
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,13 @@ fi
%{%(initialisationZonesPresent%)
%:True
# Set internal fields according to setFieldsDict
runCommand setFields
# use the OF13 dict for setFields if using openfoam 13 and later
if [ "$WM_PROJECT_VERSION" -ge 13 ] && [ "${WM_PROJECT_VERSION:0:1}" != "v" ]
then
runCommand setFields -dict system/setFieldsDict_OF13
else
runCommand setFields
fi

%}
%{%(bafflesPresent%)
Expand Down
10 changes: 9 additions & 1 deletion Data/Templates/case/Allrun.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,15 @@ else
%{%(initialisationZonesPresent%)
%:True
# Set internal fields according to setFieldsDict
runCommand setFields
# use the OF13 dict for setFields if using openfoam 13 and later
if ( $Env:WM_PROJECT_VERSION[0] -ne "v" -and 13 -le $Env:WM_PROJECT_VERSION )
{
runCommand setFields -dict system/setFieldsDict_OF13
}
else
{
runCommand setFields
}

%}
%{%(bafflesPresent%)
Expand Down
2 changes: 1 addition & 1 deletion Data/Templates/case/constant/dynamicMeshDict
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ dynamicRefineFvMeshCoeffs
topoChanger
{
type refiner;
libs ("libfvMeshTopoChangers" "libhisaMeshRebalancing");
libs ("libfvMeshTopoChangers.so" "libhisaMeshRebalancing.so");

%{%(dynamicMesh/Type%)
%:interface
Expand Down
106 changes: 106 additions & 0 deletions Data/Templates/case/system/setFieldsDict_OF13
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
%{%(initialisationZonesPresent%)
%:True
%[_header%]
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultValues
{
}

zones
{

%{%(initialisationZones%)
%{%(zones/%(0%)/PartNameList%)
%(0%)
{
type insideSurface;
zoneType cell;
surface triSurface;
file "%(0%).stl";
values
{
%{%(initialisationZones/%(1%)%)
%{%(0%)
%:Ux
U ( %(initialisationZones/%(2%)/Ux%) %(initialisationZones/%(2%)/Uy%) %(initialisationZones/%(2%)/Uz%) );
%:Uy
%:Uz
%:Pressure
%{%(solver/SolverName%)
%:interFoam multiphaseInterFoam
p_rgh %(initialisationZones/%(2%)/Pressure%);
%:simpleFoam porousSimpleFoam pimpleFoam SRFSimpleFoam
p %(initialisationZones/%(2%)/KinematicPressure%);
%:default
p %(initialisationZones/%(2%)/Pressure%);
%}
%:Temperature
%{%(physics/Flow%)
%:Isothermal
%:default
T %(initialisationZones/%(2%)/Temperature%);
%}
%:VolumeFractions
%{%(solver/SolverName%)
%:interFoam multiphaseInterFoam
%{%(initialisationZones/%(2%)/VolumeFractions%)
alpha.%(0%) %(initialisationZones/%(3%)/VolumeFractions/%(0%)%);
%}
%}
%}
%}
}
}

cellToFace
{
type insideSurface;
zoneType face;
surface triSurface;
file "%(0%).stl";
values
{
%{%(initialisationZones/%(1%)%)
%{%(0%)
%:Ux
U ( %(initialisationZones/%(2%)/Ux%) %(initialisationZones/%(2%)/Uy%) %(initialisationZones/%(2%)/Uz%) );
%:Uy
%:Uz
%:Pressure
%{%(solver/SolverName%)
%:interFoam multiphaseInterFoam
p_rgh %(initialisationZones/%(2%)/Pressure%);
%:simpleFoam porousSimpleFoam pimpleFoam
p %(initialisationZones/%(2%)/KinematicPressure%);
%:default
p %(initialisationZones/%(2%)/Pressure%);
%}
%:Temperature
T %(initialisationZones/%(2%)/Temperature%);
%:VolumeFractions
%{%(solver/SolverName%)
%:interFoam multiphaseInterFoam
%{%(initialisationZones/%(2%)/VolumeFractions%)
alpha.%(0%) %(initialisationZones/%(3%)/VolumeFractions/%(0%)%);
%}
%}
%}
%}
}
}
%}
%}
}

// ************************************************************************* //

%}
8 changes: 7 additions & 1 deletion Data/TestFiles/cases/DamBreak3D/case/Allrun
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ runCommand createPatch -overwrite
runCommand topoSet -dict system/topoSetZonesDict

# Set internal fields according to setFieldsDict
runCommand setFields
# use the OF13 dict for setFields if using openfoam 13 and later
if [ "$WM_PROJECT_VERSION" -ge 13 ] && [ "${WM_PROJECT_VERSION:0:1}" != "v" ]
then
runCommand setFields -dict system/setFieldsDict_OF13
else
runCommand setFields
fi

# Parallel decomposition
if [ ! -d processor0 ]
Expand Down
10 changes: 9 additions & 1 deletion Data/TestFiles/cases/DamBreak3D/case/Allrun.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,15 @@ runCommand createPatch -overwrite
runCommand topoSet -dict system/topoSetZonesDict

# Set internal fields according to setFieldsDict
runCommand setFields
# use the OF13 dict for setFields if using openfoam 13 and later
if ( $Env:WM_PROJECT_VERSION[0] -ne "v" -and 13 -le $Env:WM_PROJECT_VERSION )
{
runCommand setFields -dict system/setFieldsDict_OF13
}
else
{
runCommand setFields
}

# Parallel decomposition
if( !(Test-Path -PathType Container processor0) )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dynamicRefineFvMeshCoeffs
topoChanger
{
type refiner;
libs ("libfvMeshTopoChangers" "libhisaMeshRebalancing");
libs ("libfvMeshTopoChangers.so" "libhisaMeshRebalancing.so");

refineInterval 5;
field alpha.water;
Expand Down
50 changes: 50 additions & 0 deletions Data/TestFiles/cases/DamBreak3D/case/system/setFieldsDict_OF13
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| |
| Generated by the CfdOF workbench for FreeCAD |
| https://github.com/jaheyns/CfdOF |
| |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultValues
{
}

zones
{

Box002
{
type insideSurface;
zoneType cell;
surface triSurface;
file "Box002.stl";
values
{
alpha.water 1.0;
}
}

cellToFace
{
type insideSurface;
zoneType face;
surface triSurface;
file "Box002.stl";
values
{
alpha.water 1.0;
}
}
}

// ************************************************************************* //