From c39c0da9f461550e20f3de1f6d74a9799a000e24 Mon Sep 17 00:00:00 2001 From: danielque Date: Wed, 1 Dec 2021 17:59:52 +0100 Subject: [PATCH] add test case for particle-fluid convection using Ranz Marshall [ci skip] --- .../HeatTransferRanzMarshall/Allrun.sh | 21 +++ .../HeatTransferRanzMarshall/CFD/0/Ksl | 40 ++++++ .../HeatTransferRanzMarshall/CFD/0/T | 42 ++++++ .../HeatTransferRanzMarshall/CFD/0/U | 41 ++++++ .../HeatTransferRanzMarshall/CFD/0/Us | 40 ++++++ .../HeatTransferRanzMarshall/CFD/0/nut | 46 ++++++ .../HeatTransferRanzMarshall/CFD/0/p | 42 ++++++ .../HeatTransferRanzMarshall/CFD/0/rho | 40 ++++++ .../CFD/0/voidfraction | 42 ++++++ .../CFD/constant/couplingProperties | 131 ++++++++++++++++++ .../HeatTransferRanzMarshall/CFD/constant/g | 22 +++ .../CFD/constant/liggghtsCommands | 24 ++++ .../CFD/constant/thermophysicalProperties | 49 +++++++ .../CFD/constant/transportProperties | 27 ++++ .../CFD/constant/turbulenceProperties | 21 +++ .../CFD/system/blockMeshDict | 73 ++++++++++ .../CFD/system/controlDict | 58 ++++++++ .../CFD/system/decomposeParDict | 30 ++++ .../CFD/system/fvSchemes | 64 +++++++++ .../CFD/system/fvSolution | 87 ++++++++++++ .../DEM/in.liggghts_run | 130 +++++++++++++++++ .../DEM/post/.gitignore | 0 .../HeatTransferRanzMarshall/README.md | 35 +++++ .../HeatTransferRanzMarshall/parCFDDEMrun.sh | 41 ++++++ 24 files changed, 1146 insertions(+) create mode 100755 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/Allrun.sh create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/Ksl create mode 100755 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/T create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/U create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/Us create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/nut create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/p create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/rho create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/voidfraction create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/couplingProperties create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/g create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/liggghtsCommands create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/thermophysicalProperties create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/transportProperties create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/turbulenceProperties create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/blockMeshDict create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/controlDict create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/decomposeParDict create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/fvSchemes create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/fvSolution create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/DEM/in.liggghts_run create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/DEM/post/.gitignore create mode 100644 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/README.md create mode 100755 tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/parCFDDEMrun.sh diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/Allrun.sh b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/Allrun.sh new file mode 100755 index 00000000..d7152cd7 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/Allrun.sh @@ -0,0 +1,21 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# Allrun script for HeatTransferRanzMarshall test case +# run HeatTransferRanzMarshall +# Daniel Queteschiner - November 2021 +#------------------------------------------------------------------------------ + +#- 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 in new terminal +bash $casePath/parCFDDEMrun.sh diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/Ksl b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/Ksl new file mode 100644 index 00000000..94385d25 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/Ksl @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object Ksl; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -3 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + wall + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + outlet + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/T b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/T new file mode 100755 index 00000000..02e2e5d9 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/T @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 298.15; + +boundaryField +{ + wall + { + type fixedValue; + value uniform 298.15; + } + + inlet + { + type fixedValue; + value uniform 298.15; + } + + outlet + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/U b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/U new file mode 100644 index 00000000..278f588d --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/U @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + wall + { + type slip; + } + + inlet + { + type fixedValue; + value uniform (0 0 6); + } + + outlet + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/Us b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/Us new file mode 100644 index 00000000..7a47b2b2 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/Us @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object Us; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + wall + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + outlet + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/nut b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/nut new file mode 100644 index 00000000..bec49f74 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/nut @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + wall + { + type nutWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + + inlet + { + type calculated; + value uniform 0; + } + + outlet + { + type calculated; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/p b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/p new file mode 100644 index 00000000..981e0b75 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/p @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + wall + { + type zeroGradient; + } + + inlet + { +// type zeroGradient; + type fixedFluxExtrapolatedPressure; + } + + outlet + { + type fixedValue; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/rho b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/rho new file mode 100644 index 00000000..ec50c0e0 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/rho @@ -0,0 +1,40 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object rho; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -3 0 0 0 0 0]; + +internalField uniform 1.1854; // air density at 298.15K + +boundaryField +{ + wall + { + type zeroGradient; + } + + inlet + { + type zeroGradient; + } + + outlet + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/voidfraction b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/voidfraction new file mode 100644 index 00000000..75d680f7 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/0/voidfraction @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object voidfraction; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + wall + { + type zeroGradient; + } + + inlet + { + type fixedValue; + value uniform 1; + } + + outlet + { + type fixedValue; + value uniform 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/couplingProperties b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/couplingProperties new file mode 100644 index 00000000..ad965dd8 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/couplingProperties @@ -0,0 +1,131 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object couplingProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// sub-models & settings + +syncMode false; + +modelType "A"; // A or B + +couplingInterval 50; + +voidFractionModel centre; + +locateModel engine; + +meshMotionModel noMeshMotion; + +regionModel allRegion; + +IOModel off; + +probeModel off; + +dataExchangeModel twoWayMPI; + +averagingModel dilute; + +clockModel off; + +smoothingModel off; + +forceModels +( + gradPForce + viscForce + noDrag +); + +energyModels +( + heatTransferRanzMarshall +); + +//massTransferModels +//( +//); + +chemistryModels +( + off +); + +momCoupleModels +( + implicitCouple +); + +thermCondModel SyamlalThermCond; + +//diffCoeffModel off; + +turbulenceModelType "turbulenceProperties"; + + + +// sub-model properties + + +heatTransferRanzMarshallProps +{ + partTempName "Temp"; + partHeatFluxName "convectiveHeatFlux"; + calcPartTempField true; + partRefTemp 373.15; + interpolation false; +} + +SyamlalThermCondProps +{ +} + +implicitCoupleProps +{ + velFieldName "U"; + granVelFieldName "Us"; + voidfractionFieldName "voidfraction"; +} + +gradPForceProps +{ + pFieldName "p"; + voidfractionFieldName "voidfraction"; + velocityFieldName "U"; + interpolation true; +} + +viscForceProps +{ + velocityFieldName "U"; + interpolation true; +} + +engineProps +{ + treeSearch true; +} + +centreProps +{ + alphaMin 0.01; +} + +twoWayMPIProps +{ + liggghtsPath "../DEM/in.liggghts_run"; +} + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/g b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/g new file mode 100644 index 00000000..e518a680 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value ( 0 0 -9.81 ); + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/liggghtsCommands b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/liggghtsCommands new file mode 100644 index 00000000..81a66faf --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/liggghtsCommands @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object liggghtsCommands; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +liggghtsCommandModels +( + runLiggghts +); + + +// ************************************************************************* // + diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/thermophysicalProperties b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/thermophysicalProperties new file mode 100644 index 00000000..4dbddefc --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/thermophysicalProperties @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type hePsiThermo; + mixture pureMixture; + transport const; + thermo eConst; + equationOfState perfectGas; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 28.9; + } + thermodynamics + { + Cv 718; + Hf 0; + } + transport + { + mu 1.85e-05; + Pr 0.73; + } +} + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/transportProperties b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/transportProperties new file mode 100644 index 00000000..97521be6 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/transportProperties @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ 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 ] 1.56e-05; + +kf kf [ 1 1 -3 -1 0 0 0 ] 0.026; + +Cp Cp [ 0 2 -2 -1 0 0 0 ] 1007; + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/turbulenceProperties b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/turbulenceProperties new file mode 100644 index 00000000..6d46e885 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/constant/turbulenceProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/blockMeshDict b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/blockMeshDict new file mode 100644 index 00000000..adf7ef4d --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/blockMeshDict @@ -0,0 +1,73 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + ( 0.1188 0.1188 0.0 ) + (-0.1188 0.1188 0.0 ) + (-0.1188 -0.1188 0.0 ) + ( 0.1188 -0.1188 0.0 ) + + ( 0.1188 0.1188 0.216) + (-0.1188 0.1188 0.216) + (-0.1188 -0.1188 0.216) + ( 0.1188 -0.1188 0.216) +); + +blocks +( + hex (2 3 0 1 6 7 4 5) (11 11 10) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + inlet + { + type patch; + faces + ( + (0 3 2 1) + ); + } + outlet + { + type patch; + faces + ( + (4 7 6 5) + ); + } + wall + { + type wall; + faces + ( + (1 0 4 5) + (2 1 5 6) + (3 2 6 7) + (0 3 7 4) + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/controlDict b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/controlDict new file mode 100644 index 00000000..3d4254b4 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/controlDict @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application cfdemSolverRhoPimple; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 20.0; + +deltaT 0.00005; + +writeControl adjustableRunTime; + +writeInterval 0.4; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep no; + +maxCo 0.5; + + +functions +{ +} + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/decomposeParDict b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/decomposeParDict new file mode 100644 index 00000000..ce300b34 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/decomposeParDict @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + note "mesh decomposition control dictionary"; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +method simple; + +simpleCoeffs +{ + n (1 1 2); + delta 0.001; +} + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/fvSchemes b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/fvSchemes new file mode 100644 index 00000000..15f97a0e --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/fvSchemes @@ -0,0 +1,64 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default 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((viscousTerm*dev(grad(U).T()))) Gauss linear; +// div((nu*dev(grad(U).T()))) Gauss linear; +// div((nuEff*dev(grad(U).T()))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +//fluxRequired +//{ +// default no; +// p ; +//} + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/fvSolution b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/fvSolution new file mode 100644 index 00000000..3bc33d5f --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/CFD/system/fvSolution @@ -0,0 +1,87 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: 6 + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "(p|rho|rhoeps)" + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0.1; + } + + "(p|rho|rhoeps)Final" + { + $p; + relTol 0; + } + + "(U|k|e|epsilon|R|nuTilda)" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + + "(U|e|k|nuTilda)Final" + { + $U; + relTol 0; + } + + "(voidfraction|Us|Ksl|dSmoothing|UsNext|voidfractionNext)" + { + solver PCG; + preconditioner DIC; + tolerance 1e-05; + relTol 0; + } + + T + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-8; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor yes; + nOuterCorrectors 3; + nCorrectors 1; + nNonOrthogonalCorrectors 0; + + rhoMin rhoMin [ 1 -3 0 0 0 ] 0.5; + rhoMax rhoMax [ 1 -3 0 0 0 ] 2.0; + pMinFactor 0.5; + pMaxFactor 2.0; +} + +relaxationFactors +{ + equations + { + ".*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/DEM/in.liggghts_run b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/DEM/in.liggghts_run new file mode 100644 index 00000000..22cd5313 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/DEM/in.liggghts_run @@ -0,0 +1,130 @@ +################################################################################ +# brief: heat convection between 1 spheres and a fluid # +# # +# Check the temperature evolution of the sphere # +# Cf. J.Musser, Modeling of heat transfer and reactive chemistry for particles # +# in gas-solid flow utilizing continuum-discrete methodology (CDM), PhD (2011) # +# # +# The simulation outputs the temperature of the particles over time # +# # +# authors: Daniel Queteschiner # +# date: Nov 2021 # +# copyright: 2021- JKU Linz # +################################################################################ +echo both + +# define the attributes associated with the particles, +# 'granular' (or 'sphere') style uses diameter, mass and angular velocity +atom_style granular + +# use an array to map particle IDs to local storage index, +atom_modify map array + +# set simulation domain to be fixed in x y z +boundary f f f + +# save communication by turning off Newton's 3rd law for pairwise interaction, +# note: this setting only influences communication between procs, Newton's +# 3rd law is still used for contact force calculations +newton off + +# use a single value for ghost particle cutoff distance and +# enable velocity to be communicated with ghost particles +communicate single vel yes + +# set unit system to SI +units si + +# define the region used as simulation domain (min/max X, min/max Y, min/max Z) +region domain block -0.1188 0.1188 -0.1188 0.1188 0.0 0.216 units box + +# create the simulation domain and 1 material type for particle +create_box 1 domain + +# specify the skin distance for neighbor list generation +neighbor 0.001 bin +neigh_modify delay 0 + + +# particle properties +variable z1 equal 0.1080 +variable rp1 equal 0.0018 # [m] +variable dp1 equal 2*${rp1} +variable rho1 equal 8850 # [kg/m^3] +variable T10 equal 373.15 # [K] +variable lambda1 equal 0.840147 # [W/(K*m)] +variable cp1 equal 55.0354860 # [J/(kg*K)] + +# define the material properties required for granular pair styles +fix m1 all property/global youngsModulus peratomtype 5.e9 +fix m2 all property/global poissonsRatio peratomtype 0.3 +fix m3 all property/global coefficientRestitution peratomtypepair 1 0.8 +fix m4 all property/global coefficientFriction peratomtypepair 1 0.1 +fix m5 all property/global thermalConductivity peratomtype ${lambda1} +fix m6 all property/global thermalCapacity peratomtype ${cp1} + +# specify contact model to use +pair_style gran model hertz tangential incremental_history +pair_coeff * * + +timestep 0.000001 + +# granular heat conduction +fix heattransfer all heat/gran initial_temperature ${T10} + +# create particle +create_atoms 1 single 0.0 0.0 ${z1} units box + +# set diameter and density +set atom 1 diameter ${dp1} density ${rho1}. + +# cfd coupling +fix cfd1 all couple/cfd couple_every 50 mpi +fix cfd2 all couple/cfd/force/implicit +fix cfd3 all couple/cfd/convection T0 ${T10} + +# output settings +thermo_style custom step atoms f_heattransfer + +# set frequency of output +thermo 100000 + +# ignore particles leaving the simulation domain, +# do not normalize thermodynamic output values by the number of atoms +thermo_modify lost ignore norm no + +# set dynamic to 'no' as number of particles does not change +# for a single particle we need to set extra dof to 0 to obtain correct ke +compute_modify thermo_temp dynamic no extra 0 + +# run 1 time step so that property/atom Temp can be set +run 1 + +# dump particle data every 400000 time steps +dump dmp all custom/vtk 400000 ../DEM/post/conduction*.vtk id type x y z & + fx fy fz radius f_Temp f_heatFlux + +variable time equal time +variable myT atom f_Temp +variable T1 equal v_myT[1] + +# analytic solution +variable rhog equal 1.1854 # [kg/m^3] +variable Tg0 equal 298.15 # [K] +variable lambdag equal 0.026 # [W/(K*m)] +variable cpg equal 1007 # [J/(kg*K)] +variable vg equal 6.0 # [m/s] +variable epsilon equal 0.997576 # voidfraction +variable mug equal 0.0000185 # [kg/(m*s)] +variable As equal PI*${dp1}*${dp1} # particle surface area [m^2] + +variable tmp equal ${rhog}*${epsilon}*(${vg}-0)*${dp1}/${mug} +variable gammacp equal (${lambdag}/${dp1})*(2.0+0.6*sqrt(${tmp})*(${cpg}*${mug}/${lambdag})^(1/3))#cbrt(${cpg}*${mug}/${lambdag})) +variable T1analytic equal ${Tg0}-(${Tg0}-${T10})*exp(-v_time*(${gammacp}*${As})/(mass[1]*${cp1})) + +fix printTemp all print 400000 "${time} ${Tg0} ${T1} ${T1analytic}" & + file ../DEM/post/Temp.dat screen no title "#time Tg0 T1 T1analytic" + +run 1 + + diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/DEM/post/.gitignore b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/DEM/post/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/README.md b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/README.md new file mode 100644 index 00000000..a39763d3 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/README.md @@ -0,0 +1,35 @@ +## Particle-fluid convection using the Ranz-Marshall correlation for the Nusselt number + +based on +* J.M.H. Musser, Modeling of heat transfer and reactive chemistry for particles + in gas-solid flow utilizing continuum-discrete methodology (CDM), PhD thesis, (2011) +* Z.Y. Zhou, A.B. Yu, P. Zulli, AIChE Journal, 55 (4), (2009) + +#### Case parameters for a hot particle and cool air + +parameter | value +----------|------ +box width | 0.2376 m +box height | 0.216 m +box thickness | 0.2376 m +CFD time step size | 5e-5 s +DEM time step size | 1e-6 s +time simulated | 20 s +number of fluid cells | 11 x 11 x 10 +number of particles | 1 +fluid density | 1.1854 kg/m3 +fluid velocity | 6 m/s +fluid thermal conductivity | 0.026 W/(K m) +fluid heat capacity | 1007 J/(kg K) +fluid initial temperature | 298.15 K +fluid dynamic viscosity | 0.0000185 kg/(m s) +particle diameter | 3.6 mm +particle density | 8850 kg/m3 +particle thermal conductivity | 0.84 W/(K m) +particle heat capacity | 55 J/(kg K) +particle initial temperature | 373.15 K +Youngs modulus | 5e9 Pa +Poisson ratio | 0.3 +coeff. of restitution | 0.8 +coeff. of friction | 0.1 + diff --git a/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/parCFDDEMrun.sh b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/parCFDDEMrun.sh new file mode 100755 index 00000000..ca70f244 --- /dev/null +++ b/tutorials/cfdemSolverRhoPimple/HeatTransferRanzMarshall/parCFDDEMrun.sh @@ -0,0 +1,41 @@ +#!/bin/bash +#------------------------------------------------------------------------------ +# parCFDDEMrun script for HeatTransferRanzMarshall test case +# run HeatTransferRanzMarshall CFD-DEM +# Daniel Queteschiner - November 2021 +#------------------------------------------------------------------------------ + +#- 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_cfdemSolverRhoPimple_HeatTransferRanzMarshall" +logfileName="log_$headerText" +solverName="cfdemSolverRhoPimple" +nrProcs="2" +machineFileName="none" # yourMachinefileName | none +debugMode="off" # on | off| strict +runCleanUp="false" +#------------------------------------------------------------------------------ + +#- call function to run a parallel CFD-DEM case +parCFDDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName $debugMode + +if [ $runCleanUp == "true" ] + then + #- clean up case + echo "deleting data at: $casePath :\n" + source $WM_PROJECT_DIR/bin/tools/CleanFunctions + cd $casePath/CFD + cleanCase + rm $casePath/DEM/post/*.* + touch $casePath/DEM/post/.gitignore +fi + +echo "done"