From 24cf45343849666fabea774f3bac45bb1b531744 Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Tue, 11 Aug 2015 14:46:59 +0100 Subject: [PATCH] Template explicitPorositySource fvOption with a set of template coordinate systems for the porous media --- .../general/coordinateSystem/cartesianXY | 26 ++++++++ .../general/coordinateSystem/cartesianXZ | 26 ++++++++ .../general/coordinateSystem/cartesianYZ | 26 ++++++++ .../general/coordinateSystem/cylindrical | 24 ++++++++ .../general/fvOptions/porosity/porousZone | 60 +++++++++++++++++++ 5 files changed, 162 insertions(+) create mode 100644 etc/caseDicts/general/coordinateSystem/cartesianXY create mode 100644 etc/caseDicts/general/coordinateSystem/cartesianXZ create mode 100644 etc/caseDicts/general/coordinateSystem/cartesianYZ create mode 100644 etc/caseDicts/general/coordinateSystem/cylindrical create mode 100644 etc/caseDicts/general/fvOptions/porosity/porousZone diff --git a/etc/caseDicts/general/coordinateSystem/cartesianXY b/etc/caseDicts/general/coordinateSystem/cartesianXY new file mode 100644 index 00000000..820cf238 --- /dev/null +++ b/etc/caseDicts/general/coordinateSystem/cartesianXY @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.4.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object cartesianXY; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type cartesian; +origin (0 0 0); +coordinateRotation +{ + type axesRotation; + e1 $x; + e2 $y; +} + +//************************************************************************* // diff --git a/etc/caseDicts/general/coordinateSystem/cartesianXZ b/etc/caseDicts/general/coordinateSystem/cartesianXZ new file mode 100644 index 00000000..9ce5da73 --- /dev/null +++ b/etc/caseDicts/general/coordinateSystem/cartesianXZ @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.4.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object cartesianXZ; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type cartesian; +origin (0 0 0); +coordinateRotation +{ + type axesRotation; + e1 $x; + e3 $z; +} + +//************************************************************************* // diff --git a/etc/caseDicts/general/coordinateSystem/cartesianYZ b/etc/caseDicts/general/coordinateSystem/cartesianYZ new file mode 100644 index 00000000..21a91aa8 --- /dev/null +++ b/etc/caseDicts/general/coordinateSystem/cartesianYZ @@ -0,0 +1,26 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.4.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object cartesianYZ; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type cartesian; +origin (0 0 0); +coordinateRotation +{ + type axesRotation; + e2 $y; + e3 $z +} + +//************************************************************************* // diff --git a/etc/caseDicts/general/coordinateSystem/cylindrical b/etc/caseDicts/general/coordinateSystem/cylindrical new file mode 100644 index 00000000..bd71d0af --- /dev/null +++ b/etc/caseDicts/general/coordinateSystem/cylindrical @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.4.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object cylindrical; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type cartesian; +coordinateRotation +{ + type localAxesRotation; + e3 $axis; +} + +//************************************************************************* // diff --git a/etc/caseDicts/general/fvOptions/porosity/porousZone b/etc/caseDicts/general/fvOptions/porosity/porousZone new file mode 100644 index 00000000..0477d8fb --- /dev/null +++ b/etc/caseDicts/general/fvOptions/porosity/porousZone @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.4.0 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object porousZone; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +porousZone // Change to something more descriptive +{ + type explicitPorositySource; + active true; + selectionMode cellZone; + cellZone ; // Specify the name of the cellZone + + explicitPorositySourceCoeffs + { + type DarcyForchheimer; + + DarcyForchheimerCoeffs + { + // Negative coeffs are multiplied by largest positive coeff, + // taking the magnitude, e.g. for -1000, coeff = |1e7*-1000| = 1e10 + + d d [0 -2 0 0 0 0 0] (1e7 -1000 -1000); + f f [0 -1 0 0 0 0 0] (0 0 0); + + coordinateSystem // Cartesian coordinates for the cellZone + { + x (1 0 0); + y (0 1 0); + #includeEtc "caseDicts/general/coordinateSystem/cartesianXY" + } + } + + fixedCoeffCoeffs + { + alpha alpha [0 0 -1 0 0 0 0] (100 -1000 -1000); + beta beta [0 -1 0 0 0 0 0] (0 0 0); + rhoRef 1.205; + + coordinateSystem // Cylindrical coordinates for the cellZone + { + origin (0 0 0); + axis (0 0 1); + #includeEtc "caseDicts/general/coordinateSystem/cylindrical" + } + } + } +} + +//************************************************************************** //