Skip to content

Commit

Permalink
add single droplet cases
Browse files Browse the repository at this point in the history
  • Loading branch information
f-lucci committed Aug 23, 2019
1 parent ca42bd0 commit ce5df51
Show file tree
Hide file tree
Showing 44 changed files with 1,767 additions and 0 deletions.
25 changes: 25 additions & 0 deletions cases/singleDroplet/Ranz/0.org/Air.continuous
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object Air.continuous;
}

dimensions [0 0 0 0 0 0 0];

internalField uniform 0.99933;

boundaryField
{
walls
{
type zeroGradient;
}

empties
{
type empty;
}
}
25 changes: 25 additions & 0 deletions cases/singleDroplet/Ranz/0.org/M.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object VARMNAME;
}

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

internalField uniform VARM;

boundaryField
{
walls
{
type zeroGradient;
}

empties
{
type empty;
}
}
25 changes: 25 additions & 0 deletions cases/singleDroplet/Ranz/0.org/T
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object T;
}

dimensions [0 0 0 1 0 0 0];

internalField uniform 282;

boundaryField
{
walls
{
type zeroGradient;
}

empties
{
type empty;
}
}
25 changes: 25 additions & 0 deletions cases/singleDroplet/Ranz/0.org/U
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}

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

internalField uniform (1 0 0);

boundaryField
{
walls
{
type zeroGradient;
}

empties
{
type empty;
}
}
25 changes: 25 additions & 0 deletions cases/singleDroplet/Ranz/0.org/Water.continuous
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object Water.continuous;
}

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
walls
{
type zeroGradient;
}

empties
{
type empty;
}
}
25 changes: 25 additions & 0 deletions cases/singleDroplet/Ranz/0.org/Water.dispersed.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object Water.dispersed;
}

dimensions [0 0 0 0 0 0 0];

internalField uniform VARZ;

boundaryField
{
walls
{
type zeroGradient;
}

empties
{
type empty;
}
}
25 changes: 25 additions & 0 deletions cases/singleDroplet/Ranz/0.org/p
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
}

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

internalField uniform 1e5;

boundaryField
{
walls
{
type zeroGradient;
}

empties
{
type empty;
}
}
11 changes: 11 additions & 0 deletions cases/singleDroplet/Ranz/Allclean
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

cd ${0%/*} || exit 1

. $WM_PROJECT_DIR/bin/tools/CleanFunctions
. ../../../scripts/AeroSolvedCleanFunctions

cleanCase0
cleanMacros

rm -f *.pdf
88 changes: 88 additions & 0 deletions cases/singleDroplet/Ranz/Allrun
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
#!/bin/sh

cd ${0%/*} || exit 1

. $WM_PROJECT_DIR/bin/tools/RunFunctions
. ../../../scripts/AeroSolvedRunFunctions

checkPython3

# Params

SIGMA=1.0001
DCM=1.05E-3
Z=6.7e-4
RHOL=997

YMIN=1E-12
YMAX=1E-5

MATH="import math as m"

# Configure

case $1 in

moment)

MODEL=twoMomentLogNormalAnalytical

CMD=$(echo "$MATH; print($DCM*m.exp(-0.5*m.log($SIGMA)**2))" | python3)
DM=$(echo "$MATH; print($CMD*m.exp(1.5*m.log($SIGMA)**2))" | python3)

M=$(echo "$MATH; print($Z/(1.0/6.0*m.pi*$RHOL*($DM)**3))" | python3)

N=1 #Dummy

rm -f 0; cp -r 0.org 0

m4 -DVARM=$M -DVARMNAME="M" 0/M.m4 > 0/M

;;

sectional)

MODEL=fixedSectional

SECTIONSPERDECADE=8

N=$(echo "$MATH; print(int(m.log10($YMAX/$YMIN)*$SECTIONSPERDECADE))" | python3)

rm -f 0; cp -r 0.org 0

cat sections.txt | while read DATA; do

I=$(echo $DATA | cut -d " " -f 1)
XI=$(echo $DATA | cut -d " " -f 2)
MI=$(echo $DATA | cut -d " " -f 3)

m4 -DVARM=$MI -DVARMNAME="M.$I" 0/M.m4 > 0/M.$I

done

;;
*)
echo "Invalid aerosol model specified (sectional or moment)"
exit 1
;;
esac

VARS="\
-DVARMODEL=$MODEL \
-DVARN=$N \
-DVARYMIN=$YMIN \
-DVARYMAX=$YMAX \
-DVARSIGMA=$SIGMA \
-DVARZ=$Z \
-DVARRHOL=$RHOL \
"

m4 $VARS constant/aerosolProperties.m4 > constant/aerosolProperties
m4 $VARS 0/Water.dispersed.m4 > 0/Water.dispersed
m4 $VARS constant/thermophysicalProperties.dispersed.m4 > constant/thermophysicalProperties.dispersed

find 0 -name "*.m4" -exec rm {} \;

runApplication blockMesh

runApplication $(getApplication)
86 changes: 86 additions & 0 deletions cases/singleDroplet/Ranz/constant/aerosolProperties.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object aerosolProperties;
}

aerosolModel VARMODEL;

diameter
{
min 1E-9;
max 1E-2;
}

twoMomentLogNormalAnalyticalCoeffs
{
sigma VARSIGMA;
}

fixedSectionalCoeffs
{
distribution
{
type logarithmic;
yMin VARYMIN;
yMax VARYMAX;
N VARN;
}

interpolation
{
type twoMoment;
}

rescale true;
}

submodels
{
condensation
{
type coupled;

activityCoeff
{
type constant;
}

heatOfVaporization
{
active false;
}
}

nucleation
{
type none;
}

coalescence
{
type none;
}

driftFluxModel
{
diffusion
{
type none;
}

Brownian
{
type none;
}

inertial
{
type none;
}
}
}

27 changes: 27 additions & 0 deletions cases/singleDroplet/Ranz/constant/thermophysicalProperties
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object thermophysicalProperties;
}

activeSpecies
(
Water
);

inactiveSpecies
(
Air
);

inertSpecie Air;

phaseMixing
{
viscosity continuousPhase;
conductivity mass;
heatCapacity mass;
}
Loading

0 comments on commit ce5df51

Please sign in to comment.