add trilinear voidfraction test case [ci skip]

as in CFDEMcoupling-PUBLIC
This commit is contained in:
danielque
2020-08-03 13:06:23 +02:00
parent 39d66506a1
commit 71586e1192
21 changed files with 1102 additions and 0 deletions

View File

@ -0,0 +1,22 @@
#!/bin/bash
#===================================================================#
# allrun script for testcase as part of test routine
# run voidfractionTest
# Christoph Goniva - Jan. 2016
#===================================================================#
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
# check if mesh was built
if [ -f "$casePath/CFD/constant/polyMesh/points" ]; then
echo "mesh was built before - using old mesh"
else
echo "mesh needs to be built"
cd $casePath/CFD
blockMesh
fi
#- run parallel CFD-DEM
. $casePath/parCFDDEMrun.sh

View File

@ -0,0 +1,32 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object Ksl;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -3 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
"(inlet|outlet|walls)"
{
type zeroGradient;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,42 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
inlet
{
type fixedValue;
value uniform (0 0 0);
}
outlet
{
type zeroGradient;
value uniform (0 0 0);
}
walls
{
type fixedValue;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,32 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object Us;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
"(inlet|outlet|walls)"
{
type zeroGradient;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type zeroGradient;
value uniform 0;
}
inlet
{
type zeroGradient;
value uniform 0;
}
outlet
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,30 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -3 0 0 0 0 0];
internalField uniform 10;
boundaryField
{
"(inlet|outlet|walls)"
{
type zeroGradient;
value uniform 10;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,30 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object voidfraction;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField
{
"(inlet|outlet|walls)"
{
type zeroGradient;
value uniform 1;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,137 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object couplingProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//===========================================================================//
// sub-models & settings
solveFlow off;
useDDTvoidfraction;
modelType B;
couplingInterval 100;
voidFractionModel trilinear;
locateModel engine;
meshMotionModel noMeshMotion;
IOModel basicIO;
probeModel off;
dataExchangeModel twoWayMPI;
averagingModel dense;
clockModel off;
smoothingModel off;
forceModels
(
DiFeliceDrag
Archimedes
noDrag
particleCellVolume
volWeightedAverage
);
momCoupleModels
(
implicitCouple
);
turbulenceModelType "turbulenceProperties";
//===========================================================================//
// sub-model properties
noDragProps
{
}
particleCellVolumeProps
{
upperThreshold 1e20;
lowerThreshold 0.;
verbose true;
writeToFile true;
}
volWeightedAverageProps
{
scalarFieldNames
(
ddtVoidfraction
);
vectorFieldNames
(
);
upperThreshold 1e20;
lowerThreshold 0;
writeToFile true;
verbose true;
}
implicitCoupleProps
{
velFieldName "U";
granVelFieldName "Us";
voidfractionFieldName "voidfraction";
}
DiFeliceDragProps
{
velFieldName "U";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
verbose false;
}
ArchimedesProps
{
densityFieldName "rho";
gravityFieldName "g";
}
twoWayMPIProps
{
liggghtsPath "../DEM/in.liggghts_run";
}
trilinearProps
{
alphaMin 0.3; // unused!
}
engineProps
{
treeSearch true;
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value ( 0 -9.81 0);
// ************************************************************************* //

View File

@ -0,0 +1,32 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object liggghtsCommands;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
liggghtsCommandModels
(
runLiggghts
);
// ************************************************************************* //

View File

@ -0,0 +1,38 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-05;
CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 1;
}
BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 0;
n n [ 0 0 0 0 0 0 0 ] 1;
}
// ************************************************************************* //

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar;
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
%test
close all;
clear;
clc;
%====================================%
% simulation data
%====================================%
path = '../postProcessing/particleCellVolume/0/particleCellVolume.txt';
data = load(path);
Vp_sim = data(:,2);
t_sim = data(:,1);
path = '../postProcessing/volWeightedAverage/0/volWeightedAverage.txt';
data = load(path);
volAvDdtVoidFraction_sim = data(:,2);
t_sim = data(:,1);
%====================================%
dp=2*0.0015;
vp=0.3
deltaT=0.001 % coupling time
%====================================%
% analytical calculation
%====================================%
Vp=dp*dp*dp*pi/6;
np=1000;
Vptot=np*Vp
kernelSize=8
Vc=(0.1/10)^3*kernelSize
Vp=dp^3*pi/6
deltaVpdt=Vp*(deltaT*vp)/dp
avg_ddt_voidfraction=deltaVpdt/(Vc*deltaT)
%====================================%
% plot data
%====================================%
figure(1)
plot(t_sim,(Vp_sim./Vptot)*100,'r-')
hold on;
%legend("error")
title("particle volume represented in cells");
grid on;
xlabel("time in s");
ylabel("particle cell volume / particle volume in %");
print('-dpng','-r450', 'particleCellVolume')
figure(2)
plot(t_sim,volAvDdtVoidFraction_sim,'r-',[min(t_sim),max(t_sim)],[avg_ddt_voidfraction,avg_ddt_voidfraction],'b-')
grid on;
%axis([0,max(t_sim),0,100])
hold on;
legend("simulation",'analytic')
title("average ddt(voidfraction)");
grid on;
xlabel("time in s");
ylabel("average ddt(voidfraction)");
print('-dpng','-r450', 'averageDDTvoidfraction')

View File

@ -0,0 +1,63 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
(0.0 0 0.0)
(0.1 0 0.0)
(0.1 0.1 0.0)
(0.0 0.1 0.0)
(0.0 0 1.0)
(0.1 0 1.0)
(0.1 0.1 1.0)
(0.0 0.1 1.0)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (10 10 100) simpleGrading (1 1 1)
);
edges
(
);
patches
(
patch inlet
(
(3 7 6 2)
)
patch outlet
(
(1 5 4 0)
)
wall walls
(
(0 4 7 3)
(2 6 5 1)
(0 3 2 1)
(4 5 6 7)
)
);
mergePatchPairs
(
);
// ************************************************************************* //

View File

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application cfdemSolverPiso;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 0.2;
deltaT 0.001;
writeControl adjustableRunTime;
writeInterval 0.001;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 1;
maxDeltaT 1;
functions
{
probes
{
type probes;
functionObjectLibs ( "libsampling.so" );
// directory for probe data
name probes;
probeLocations
(
(0.05001 0.05001 0.5)
);
// fields to be probed
fields ( volAverage_ddtVoidfraction voidfraction );
// write at same frequency as fields
writeControl timeStep;//outputTime;
writeInterval 1;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application cfdemSolverPiso;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 0.2;
deltaT 0.001;
writeControl adjustableRunTime;
writeInterval 0.001;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 1;
maxDeltaT 1;
functions
{
probes
{
type probes;
functionObjectLibs ( "libsampling.so" );
// directory for probe data
name probes;
probeLocations
(
(0.05001 0.05001 0.5)
);
// fields to be probed
fields ( volAverage_ddtVoidfraction voidfraction );
// write at same frequency as fields
writeControl timeStep;//outputTime;
writeInterval 1;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,33 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 2;
method simple;
simpleCoeffs
{
n ( 1 1 2 );
delta 0.001;
}
distributed no;
roots ( );
// ************************************************************************* //

View File

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}
divSchemes
{
default Gauss linear;
div(phi,U) Gauss limitedLinearV 1;
div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
div(phi,R) Gauss limitedLinear 1;
div(R) Gauss linear;
div(phi,nuTilda) Gauss limitedLinear 1;
div((nuEff*dev(grad(U).T()))) Gauss linear;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div((viscousTerm*dev(grad(U).T()))) Gauss linear;
div((nu*dev(grad(U).T()))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
laplacian(viscousTerm,U) Gauss linear corrected;
laplacian(nu,U) Gauss linear corrected;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian((voidfraction2|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p ;
}
// ************************************************************************* //

View File

@ -0,0 +1,62 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.1;
}
pFinal
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
}
"(U|k|epsilon|R|nuTilda)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}
"(voidfraction|Ksl|UsNext|voidfractionNext|sSmoothField|vSmoothField|fSmooth)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-09;
relTol 1e-06;
}
}
PISO
{
nCorrectors 4;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,76 @@
echo both
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
atom_style granular
atom_modify map array sort 0 0
communicate single vel yes
boundary f f f
newton off
units si
region reg block 0.0 0.1 0.0 0.1 0.0 1.0 units box
create_box 1 reg
neighbor 0.003 bin
neigh_modify delay 0 binsize 0.01
# material properties required for granular pair style
fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history
pair_coeff * *
# timestep, gravity
timestep 0.00001
fix gravi all gravity 0.0 vector 0.0 0.0 -1.0
# walls
fix xwalls1 all wall/gran model hertz tangential history primitive type 1 xplane 0.0
fix xwalls2 all wall/gran model hertz tangential history primitive type 1 xplane 0.1
fix ywalls1 all wall/gran model hertz tangential history primitive type 1 yplane 0.0
fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane 0.1
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.01
# create particles
region bc block 0.0 0.1 0.0 0.1 0.53 1.0 units box
fix pts1 all particletemplate/sphere 15485863 atom_type 1 density constant 3000 radius constant 0.0015
fix pdd1 all particledistribution/discrete 15485867 1 pts1 1.0
fix ins all insert/pack seed 32452843 distributiontemplate pdd1 vel constant 0. 0. -0.3 &
insert_every once overlapcheck yes all_in yes particles_in_region 1000 region bc
# cfd coupling
fix cfd1 all couple/cfd couple_every 100 mpi
fix cfd2 all couple/cfd/force
variable vx equal vx[1]
variable vy equal vy[1]
variable vz equal vz[1]
variable time equal step*dt
fix extra all print 100 "${time} ${vx} ${vy} ${vz}" file ../DEM/post/velocity.txt title "#" screen no
# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
# screen output
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
# insert the first particles so that dump is not empty
run 0
dump dmp all custom 1000 ../DEM/post/dump.liggghts_run id type x y z vx vy vz &
fx fy fz omegax omegay omegaz radius
run 0 upto

View File

@ -0,0 +1,97 @@
#!/bin/bash
#===================================================================#
# allrun script for testcase as part of test routine
# run voidfractionTest CFD part
# Christoph Goniva - Feb. 2011
#===================================================================#
#- source CFDEM env vars
. ~/.bashrc
#- include functions
source $CFDEM_PROJECT_DIR/etc/functions.sh
#--------------------------------------------------------------------------------#
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
logpath=$casePath
headerText="run_parallel_cfdemSolverPiso_voidfractionTest_CFDDEM"
logfileName="log_$headerText"
solverName="cfdemSolverPiso"
nrProcs="2"
machineFileName="none" # yourMachinefileName | none
debugMode="off" # on | off| strict
reconstuctCase="false"
testHarnessPath="$CFDEM_TEST_HARNESS_PATH"
runOctave="true"
cleanUp="true"
postproc="false"
#--------------------------------------------------------------------------------#
#- call function to run a parallel CFD-DEM case
parCFDDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName $debugMode $reconstuctCase
if [ $runOctave == "true" ]
then
#- change path
cd octave
#- rmove old graph
rm averageDDTvoidfraction.png
#- run octave
octave --no-gui particleCellVolume.m
#- show plot
eog averageDDTvoidfraction.png
#- copy log file to test harness
cp ../../$logfileName $testHarnessPath
cp averageDDTvoidfraction.png $testHarnessPath
fi
if [ $postproc == "true" ]
then
#- keep terminal open (if started in new terminal)
echo "simulation finished? ...press enter to proceed"
read
#- get VTK data from liggghts dump file
cd $casePath/DEM/post
python -i $CFDEM_LPP_DIR/lpp.py dump.liggghts_run
#- get VTK data from CFD sim
cd $casePath/CFD
foamToVTK #- serial run of foamToVTK
#- start paraview
paraview
#- keep terminal open (if started in new terminal)
echo "...press enter to clean up case"
echo "press Ctr+C to keep data"
read
fi
#- clean up case
if [ $cleanUp == "true" ]
then
echo "deleting data at: $casePath ?:\n"
read
source $WM_PROJECT_DIR/bin/tools/CleanFunctions
cd $casePath/CFD
cleanCase
cd $casePath
rm -r $casePath/CFD/particleProbes
rm -r $casePath/CFD/postProcessing
rm -r $casePath/CFD/clockData
rm -r $casePath/DEM/post/*
rm -r $casePath/DEM/liggghts.restartCFDEM*
echo "done"
fi
#- preserve post directory
touch $casePath/DEM/post/.gitignore