mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
release on 2012-07-17_15-53-04
This commit is contained in:
23
tutorials/cfdemSolverPisoScalar/packedBedTemp/Allrun.sh
Executable file
23
tutorials/cfdemSolverPisoScalar/packedBedTemp/Allrun.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
#===================================================================#
|
||||
# allrun script for testcase as part of test routine
|
||||
# run settlingTest
|
||||
# Christoph Goniva - August 2011
|
||||
#===================================================================#
|
||||
|
||||
#- define variables
|
||||
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
|
||||
|
||||
# check if mesh was built
|
||||
if [ -d "$casePath/CFD/constant/polyMesh/boundary" ]; 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
|
||||
gnome-terminal --title='cfdemSolverPisoScalar packedBedTemp CFD' -e "bash $casePath/parCFDDEMrun.sh"
|
||||
|
||||
41
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/Ksl
Normal file
41
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/Ksl
Normal file
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- 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
|
||||
{
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
//type fixedValue;
|
||||
//value uniform 0;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
40
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/T
Normal file
40
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/T
Normal file
@ -0,0 +1,40 @@
|
||||
/*--------------------------------*- 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 T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 263;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 263;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
50
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/Tsource
Normal file
50
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/Tsource
Normal file
@ -0,0 +1,50 @@
|
||||
/*--------------------------------*- 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.05";
|
||||
object Tsource;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 -1 1 0 0 0];
|
||||
|
||||
// Tsource[K/s] = q[W/m3]/(rho[kg/m3]*cp[W*s/(kg*K)])
|
||||
// Q=10 W
|
||||
// V=0.01 m3
|
||||
// q=1000 W/m3
|
||||
// cp=1000
|
||||
// rho=1
|
||||
// --> Tsource = 1
|
||||
|
||||
internalField uniform 1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 0;
|
||||
}
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
40
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/U
Normal file
40
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/U
Normal file
@ -0,0 +1,40 @@
|
||||
/*--------------------------------*- 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 volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 1);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
|
||||
wall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 1);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
45
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/Us
Normal file
45
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/Us
Normal file
@ -0,0 +1,45 @@
|
||||
/*--------------------------------*- 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
|
||||
{
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
//type fixedValue;
|
||||
//value uniform (1 0 0);
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
//type fixedValue;
|
||||
//value uniform (1 0 0);;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
//type fixedValue;
|
||||
//value uniform (1 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
48
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/epsilon
Normal file
48
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/epsilon
Normal file
@ -0,0 +1,48 @@
|
||||
/*--------------------------------*- 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 epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 0.003;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wall
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
Cmu 0.09;
|
||||
kappa 0.41;
|
||||
E 9.8;
|
||||
value uniform 0.003;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.003;
|
||||
value uniform 0.003;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
/*type turbulentMixingLengthDissipationRateInlet;
|
||||
mixingLength 0.005;
|
||||
value uniform 0.003;*/
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
45
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/k
Normal file
45
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/k
Normal file
@ -0,0 +1,45 @@
|
||||
/*--------------------------------*- 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 k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0.001;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wall
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.001;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.001;
|
||||
value uniform 0.001;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
/*type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.05;
|
||||
value uniform 0.001;*/
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
45
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/nut
Normal file
45
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/nut
Normal file
@ -0,0 +1,45 @@
|
||||
/*--------------------------------*- 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 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;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
43
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/p
Normal file
43
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/p
Normal file
@ -0,0 +1,43 @@
|
||||
/*--------------------------------*- 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 1.0e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
//type fixedValue;
|
||||
//value uniform 100000;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
//type zeroGradient;
|
||||
type fixedValue;
|
||||
value uniform 1.0e5;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
39
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/rho
Normal file
39
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/0/rho
Normal file
@ -0,0 +1,39 @@
|
||||
/*--------------------------------*- 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 rho;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -3 0 0 0 0 0];
|
||||
|
||||
internalField uniform 1.188;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- 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 voidfraction;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1;
|
||||
}
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,25 @@
|
||||
/*--------------------------------*- 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 RASProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel laminar;//kEpsilon;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,148 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / 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
|
||||
|
||||
modelType B; // A or B
|
||||
|
||||
couplingInterval 200;
|
||||
|
||||
voidFractionModel divided;
|
||||
|
||||
locateModel engine;
|
||||
|
||||
meshMotionModel noMeshMotion;
|
||||
|
||||
regionModel allRegion;
|
||||
|
||||
IOModel off;
|
||||
|
||||
dataExchangeModel twoWayMPI;//twoWayFiles;//oneWayVTK;//
|
||||
|
||||
averagingModel dilute;//dense;//
|
||||
|
||||
clockModel off;
|
||||
|
||||
forceModels
|
||||
(
|
||||
KochHillDrag
|
||||
LaEuScalarTemp
|
||||
Archimedes
|
||||
);
|
||||
|
||||
momCoupleModels
|
||||
(
|
||||
implicitCouple
|
||||
);
|
||||
|
||||
turbulenceModelType RASProperties;//LESProperties;//
|
||||
|
||||
//===========================================================================//
|
||||
// sub-model properties
|
||||
|
||||
LaEuScalarTempProps
|
||||
{
|
||||
velFieldName "U";
|
||||
tempFieldName "T";
|
||||
voidfractionFieldName "voidfraction";
|
||||
tempSourceFieldName "Tsource";
|
||||
partTempName "Temp";
|
||||
partHeatFluxName "convectiveHeatFlux";
|
||||
lambda 0.0256;
|
||||
Cp 1007;
|
||||
densityFieldName "rho";
|
||||
}
|
||||
|
||||
implicitCoupleProps
|
||||
{
|
||||
velFieldName "U";
|
||||
granVelFieldName "Us";
|
||||
voidfractionFieldName "voidfraction";
|
||||
//KslLimit 0; // source switched off!!!
|
||||
}
|
||||
|
||||
KochHillDragProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
voidfractionFieldName "voidfraction";
|
||||
}
|
||||
|
||||
DiFeliceDragProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
//verbose;
|
||||
}
|
||||
|
||||
ArchimedesProps
|
||||
{
|
||||
densityFieldName "rho";
|
||||
gravityFieldName "g";
|
||||
}
|
||||
gradPForceProps
|
||||
{
|
||||
pFieldName "p";
|
||||
densityFieldName "rho";
|
||||
interpolation;
|
||||
}
|
||||
|
||||
viscForceProps
|
||||
{
|
||||
velocityFieldName "U";
|
||||
densityFieldName "rho";
|
||||
interpolation;
|
||||
}
|
||||
|
||||
oneWayVTKProps
|
||||
{
|
||||
couplingFilename "vtk_out%4.4d.vtk";
|
||||
maxNumberOfParticles 30000;
|
||||
}
|
||||
|
||||
twoWayMPIProps
|
||||
{
|
||||
maxNumberOfParticles 10000;
|
||||
liggghtsPath "../DEM/in.liggghts_init";
|
||||
}
|
||||
|
||||
centreProps
|
||||
{
|
||||
alphaMin 0.1;
|
||||
}
|
||||
|
||||
dividedProps
|
||||
{
|
||||
alphaMin 0.1;
|
||||
scaleUpVol 1.0;
|
||||
}
|
||||
|
||||
engineProps
|
||||
{
|
||||
treeSearch true;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
22
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/constant/g
Normal file
22
tutorials/cfdemSolverPisoScalar/packedBedTemp/CFD/constant/g
Normal 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);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,57 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / 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
|
||||
execute
|
||||
);
|
||||
|
||||
// reset particle temperature every coupling step
|
||||
executeProps1
|
||||
{
|
||||
command
|
||||
(
|
||||
set
|
||||
region
|
||||
total
|
||||
noBlanks
|
||||
property
|
||||
slash
|
||||
atom // former peratom
|
||||
blanks
|
||||
Temp
|
||||
number
|
||||
);
|
||||
scalars
|
||||
(
|
||||
600
|
||||
);
|
||||
runFirst off;
|
||||
runLast off;
|
||||
runEveryCouplingStep on;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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.1)
|
||||
(0.1 0 -0.1)
|
||||
(0.1 0.1 -0.1)
|
||||
(0. 0.1 -0.1)
|
||||
(0. 0 1.1)
|
||||
(0.1 0 1.1)
|
||||
(0.1 0.1 1.1)
|
||||
(0. 0.1 1.1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (2 2 22) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
wall inlet
|
||||
(
|
||||
(0 3 2 1)
|
||||
)
|
||||
wall outlet
|
||||
(
|
||||
(4 5 6 7)
|
||||
)
|
||||
wall wall
|
||||
(
|
||||
(3 7 6 2)
|
||||
(1 5 4 0)
|
||||
(0 4 7 3)
|
||||
(2 6 5 1)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,41 @@
|
||||
/*--------------------------------*- 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 ] 1.5e-03;
|
||||
|
||||
DT DT [ 0 2 -1 0 0 0 0 ] 2.1399e-5;//2.1399e-5; // lambda/(rho*Cp) = 0.0256/(1.188*1007)
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 RASModel;//LESModel; //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,69 @@
|
||||
function [data,colname]=loaddata(filename,columns,headerlines)
|
||||
|
||||
% data = loaddata(filename,columns,headerlines)
|
||||
% data = loaddata(filename,0,headerlines): automatc detection of
|
||||
% columns by word count in first headerline or first data line
|
||||
% (if headerline==0), separated by blanks or tabs
|
||||
% columns=-1: write colum assignment code lines
|
||||
% works only if headerline>0 and colnames separated by
|
||||
% not more than 1 blank!
|
||||
% columns=-2: columns separated by 2 blanks (fluent/scheme auswertung-instat.scm)
|
||||
% [data, colname] = loaddata(filename,0,headerlines)
|
||||
% colname = cell string array of column names from headerline
|
||||
|
||||
fprintf(1,'loading %s ... ', filename);
|
||||
f=fopen(filename,'r');
|
||||
if f==-1
|
||||
fprintf(1,'\n*** error: could not open "%s" ...\n', filename);
|
||||
data=[];
|
||||
else
|
||||
for i=1:headerlines
|
||||
if i==1 s=fgets(f); else fgets(f); end
|
||||
end
|
||||
if headerlines==0
|
||||
s=fgets(f); frewind(f);
|
||||
end
|
||||
if columns<=0 % & headerlines>=1
|
||||
fprintf(1,'\n');
|
||||
fprintf(1,' %s',s);
|
||||
pos = findstr(sprintf('\t'),s); % trennzeichenpositionen in zeile suchen
|
||||
if length(pos)>0
|
||||
endpos=length(s);
|
||||
%if isspace(s(endpos-1)) endpos=endpos-1; end
|
||||
pos = [0 pos(1,:) endpos]; % anfangs- und endposition hinzuf<EFBFBD>gen
|
||||
elseif columns==-2 % spalteneintr<EFBFBD>ge durch 2 blanks getrennt (fluent/scheme)
|
||||
pos=[0];
|
||||
for i=1:length(s)-1
|
||||
if isspace(s(i)) & isspace(s(i+1))
|
||||
pos(end+1)=i+1;
|
||||
end
|
||||
end
|
||||
pos(end+1)=length(s);
|
||||
else % spalteneintr<EFBFBD>ge durch blanks getrennt
|
||||
%pos = findstr(' ',s); % trennzeichenpositionen in zeile suchen
|
||||
pos=[];
|
||||
word=0;
|
||||
for i=1:length(s)
|
||||
if isspace(s(i))
|
||||
word=0;
|
||||
elseif ~word
|
||||
word=1;
|
||||
pos(end+1)=i-1;
|
||||
end
|
||||
end
|
||||
pos(end+1)=length(s);
|
||||
end
|
||||
if headerlines>=1
|
||||
for i=1:length(pos)-1 % alle spalten
|
||||
colname{i}=s(pos(i)+1:pos(i+1)-1);
|
||||
if columns==-1 fprintf(' = data(strmatch(''%s'',colname),:); %% column %d\n', colname{i},i); end
|
||||
if columns==-2 fprintf('%% column %d: %s\n', i, colname{i}); end
|
||||
end
|
||||
end
|
||||
columns = length(pos)-1;
|
||||
fprintf(1,' total: %d columns ',columns);
|
||||
end
|
||||
data=fscanf(f,'%f',[columns,inf]);
|
||||
fclose(f);
|
||||
fprintf(1,'done.\n');
|
||||
end
|
||||
@ -0,0 +1,136 @@
|
||||
close all;
|
||||
clear;
|
||||
clc;
|
||||
|
||||
|
||||
%*********************************************************************%
|
||||
% pressure drop
|
||||
%*********************************************************************%
|
||||
|
||||
%===================
|
||||
% Ergun Equation
|
||||
%===================
|
||||
fprintf('\ncalc Ergun eqn:\n')
|
||||
dp = 0.022; % particle diameter
|
||||
phip = 1; % sphericity
|
||||
epsilon = 0.41; % voidfraction
|
||||
U = 1; % superficial velocity
|
||||
L = 1; % length of bed
|
||||
rhoG = 1.188; % density in kg/m
|
||||
nuG = 1.5e-3; % kinemat Visk in m2/s
|
||||
muG = nuG*rhoG % dynam visc in Pa s
|
||||
|
||||
dpErgun= L * (
|
||||
150*((1-epsilon)^2/epsilon^3)*((muG*U)/(phip*dp)^2)
|
||||
+1.75*((1-epsilon)/epsilon^3)*((rhoG*U^2)/(phip*dp))
|
||||
)
|
||||
|
||||
fprintf('final pressure drop = %f Pa\n',dpErgun)
|
||||
%====================================%
|
||||
% simulation data
|
||||
%====================================%
|
||||
path = '../probes/0/p';
|
||||
columns=3;
|
||||
headerlines=5;
|
||||
data = loaddata(path,columns,headerlines);
|
||||
data=transpose(data);
|
||||
[x,y]=size(data);
|
||||
dp_sim = data(:,2)-data(:,y);
|
||||
t_sim = data(:,1);
|
||||
fprintf('final pressureDrop of sim = %f Pa\n',dp_sim(length(dp_sim)) )
|
||||
|
||||
%====================================%
|
||||
% plot data
|
||||
%====================================%
|
||||
figure(1)
|
||||
plot(t_sim,dpErgun*ones(1,length(t_sim)),t_sim,dp_sim)
|
||||
title("Ergun pressure drop")
|
||||
legend("analytical - Ergun","simulation")
|
||||
|
||||
%print('cfdemSolverPiso_settlingTest.eps','-deps2')
|
||||
print -color "cfdemSolverPisoScalar_pressureDrop.eps"
|
||||
replot;
|
||||
|
||||
%*********************************************************************%
|
||||
% heat transfer
|
||||
%*********************************************************************%
|
||||
|
||||
%====================================%
|
||||
% simulation data
|
||||
%====================================%
|
||||
|
||||
cp = 1007;
|
||||
A = 0.01;
|
||||
U = U;
|
||||
alpha = epsilon;
|
||||
nuF = nuG;
|
||||
rhoF = rhoG;
|
||||
Tp = 600;
|
||||
Np = 1005;
|
||||
lambda = 0.0256;
|
||||
|
||||
path = '../probes/0/T';
|
||||
columns=3;
|
||||
headerlines=5;
|
||||
data = loaddata(path,columns,headerlines);
|
||||
data=transpose(data);
|
||||
[x,y]=size(data);
|
||||
Tin_sim = data(:,2); % mean temp inlet temp [K]
|
||||
Tout_sim = data(:,3); % mean temp outlet temp [K]
|
||||
t_sim = data(:,1);
|
||||
fprintf('final inlet temperature of sim = %f K\n',Tin_sim(length(Tin_sim)) )
|
||||
fprintf('final outlet temperature of sim = %f K\n',Tout_sim(length(Tout_sim)) )
|
||||
|
||||
|
||||
uF = U/alpha; % interstitial velocity [m/s]
|
||||
ReP_sim = uF.*ones(length(t_sim),1)*dp/nuF; % ReynoldsNr based in dp
|
||||
Pr = nuF*rhoF*cp/lambda;
|
||||
qin_sim = U * A * rhoF * cp .* Tin_sim;
|
||||
qout_sim = U * A * rhoF * cp .* Tout_sim;
|
||||
q_sim = (qout_sim-qin_sim); % particle fluid heat flux [W] (out-in)
|
||||
Tmean_sim = 0.5*(Tin_sim+Tout_sim); % mean temp of fluid
|
||||
deltaT = Tp - Tmean_sim; % mean temp diff between partcles and fluid
|
||||
h=q_sim./(Np*dp^2*pi*deltaT); % average particle-fluid heat transfer coeff [W/(m2*K)]
|
||||
Nu_sim = h.*dp/lambda; % mean particle Nusselt nr
|
||||
t_sim = data(:,1);
|
||||
fprintf('q_sim = %f \n',q_sim(length(Nu_sim)))
|
||||
fprintf('Nu_sim = %f \n',Nu_sim(length(Nu_sim)))
|
||||
|
||||
%===================
|
||||
% Nusselt Equation
|
||||
%===================
|
||||
fprintf('\ncalc Nusselt eqn:\n')
|
||||
|
||||
%% following Li and Mason
|
||||
n=3.5
|
||||
if (ReP_sim(length(uF)) <200)
|
||||
Nu_LiMason=2.*ones(length(uF),1)+0.6*alpha^n.*ReP_sim.^0.5.*Pr^0.33;
|
||||
elseif (ReP_sim(length(uF)) <1500)
|
||||
Nu_LiMason=2.*ones(length(uF),1)+0.5*alpha^n.*ReP_sim.^0.5*Pr^0.33 + 0.02*alpha^n.*ReP_sim.^0.8.*Pr^0.33;
|
||||
else
|
||||
Nu_LiMason=2.*ones(length(uF),1) +0.000045*alpha^n.*ReP_sim.^1.8;
|
||||
end
|
||||
|
||||
fprintf('Nu_LiMason = %f \n',Nu_LiMason(length(Nu_LiMason)))
|
||||
|
||||
%====================================%
|
||||
% plot data
|
||||
%====================================%
|
||||
figure(2)
|
||||
plot(t_sim,Nu_LiMason,t_sim,Nu_sim)
|
||||
title("Nusselt nr")
|
||||
legend("analytical - ","simulation")
|
||||
|
||||
%print('cfdemSolverPisoScalar_NusseltNr.eps','-deps2')
|
||||
print -color "cfdemSolverPisoScalar_Nusselt.eps"
|
||||
replot;
|
||||
|
||||
figure(3)
|
||||
plot(t_sim,Tin_sim,t_sim,Tout_sim)
|
||||
title("inlet/outlet temperature")
|
||||
legend("inlet","outlet")
|
||||
|
||||
%print('cfdemSolverPisoScalar_NusseltNr.eps','-deps2')
|
||||
print -color "cfdemSolverPisoScalar_temperatures.eps"
|
||||
replot;
|
||||
|
||||
@ -0,0 +1,158 @@
|
||||
/*--------------------------------*- 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 interDyMFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0.7;
|
||||
|
||||
deltaT 0.0001;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.1;//0.002;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep no;
|
||||
|
||||
maxCo 1;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
functions
|
||||
(
|
||||
|
||||
probes
|
||||
{
|
||||
type probes;
|
||||
// Where to load it from
|
||||
functionObjectLibs ( "libsampling.so" );
|
||||
// Name of the directory for probe data
|
||||
name probes;
|
||||
probeLocations
|
||||
(
|
||||
(0.05 0.05 -0.099)
|
||||
(0.05 0.05 1.099)
|
||||
);
|
||||
|
||||
// Fields to be probed
|
||||
fields ( p T);
|
||||
|
||||
// Write at same frequency as fields
|
||||
outputControl timeStep;//outputTime;
|
||||
outputInterval 1;
|
||||
}
|
||||
|
||||
/*
|
||||
// simpleFunctionObjects
|
||||
heatFlux
|
||||
{
|
||||
type patchHeatFlux;
|
||||
functionObjectLibs
|
||||
(
|
||||
"libsimpleFunctionObjects.so"
|
||||
);
|
||||
verbose true;
|
||||
patches
|
||||
(
|
||||
inlet
|
||||
outlet
|
||||
);
|
||||
fields // name of temp field
|
||||
(
|
||||
T
|
||||
);
|
||||
cp 1007; // cp in [J/(kg*K)]
|
||||
factor 1.188; // density for incomp solvers!
|
||||
}
|
||||
|
||||
massFlux
|
||||
{
|
||||
type patchMassFlow;
|
||||
functionObjectLibs
|
||||
(
|
||||
"libsimpleFunctionObjects.so"
|
||||
);
|
||||
verbose true;
|
||||
patches
|
||||
(
|
||||
inlet
|
||||
outlet
|
||||
);
|
||||
factor 1.188; // density for incomp solvers!
|
||||
}
|
||||
|
||||
pressureDrop
|
||||
{
|
||||
type patchAverage;
|
||||
functionObjectLibs
|
||||
(
|
||||
"libsimpleFunctionObjects.so"
|
||||
);
|
||||
verbose true;
|
||||
patches
|
||||
(
|
||||
inlet
|
||||
outlet
|
||||
);
|
||||
fields
|
||||
(
|
||||
p
|
||||
);
|
||||
factor 1;
|
||||
}
|
||||
|
||||
T
|
||||
{
|
||||
type patchAverage;
|
||||
functionObjectLibs
|
||||
(
|
||||
"libsimpleFunctionObjects.so"
|
||||
);
|
||||
verbose true;
|
||||
patches
|
||||
(
|
||||
inlet
|
||||
outlet
|
||||
);
|
||||
fields // name of temp field
|
||||
(
|
||||
T
|
||||
);
|
||||
factor 1;
|
||||
}*/
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,158 @@
|
||||
/*--------------------------------*- 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 interDyMFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0.7;
|
||||
|
||||
deltaT 0.0001;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.1;//0.002;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep no;
|
||||
|
||||
maxCo 1;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
functions
|
||||
(
|
||||
|
||||
probes
|
||||
{
|
||||
type probes;
|
||||
// Where to load it from
|
||||
functionObjectLibs ( "libsampling.so" );
|
||||
// Name of the directory for probe data
|
||||
name probes;
|
||||
probeLocations
|
||||
(
|
||||
(0.05 0.05 -0.099)
|
||||
(0.05 0.05 1.099)
|
||||
);
|
||||
|
||||
// Fields to be probed
|
||||
fields ( p T);
|
||||
|
||||
// Write at same frequency as fields
|
||||
outputControl timeStep;//outputTime;
|
||||
outputInterval 1;
|
||||
}
|
||||
|
||||
/*
|
||||
// simpleFunctionObjects
|
||||
heatFlux
|
||||
{
|
||||
type patchHeatFlux;
|
||||
functionObjectLibs
|
||||
(
|
||||
"libsimpleFunctionObjects.so"
|
||||
);
|
||||
verbose true;
|
||||
patches
|
||||
(
|
||||
inlet
|
||||
outlet
|
||||
);
|
||||
fields // name of temp field
|
||||
(
|
||||
T
|
||||
);
|
||||
cp 1007; // cp in [J/(kg*K)]
|
||||
factor 1.188; // density for incomp solvers!
|
||||
}
|
||||
|
||||
massFlux
|
||||
{
|
||||
type patchMassFlow;
|
||||
functionObjectLibs
|
||||
(
|
||||
"libsimpleFunctionObjects.so"
|
||||
);
|
||||
verbose true;
|
||||
patches
|
||||
(
|
||||
inlet
|
||||
outlet
|
||||
);
|
||||
factor 1.188; // density for incomp solvers!
|
||||
}
|
||||
|
||||
pressureDrop
|
||||
{
|
||||
type patchAverage;
|
||||
functionObjectLibs
|
||||
(
|
||||
"libsimpleFunctionObjects.so"
|
||||
);
|
||||
verbose true;
|
||||
patches
|
||||
(
|
||||
inlet
|
||||
outlet
|
||||
);
|
||||
fields
|
||||
(
|
||||
p
|
||||
);
|
||||
factor 1;
|
||||
}
|
||||
|
||||
T
|
||||
{
|
||||
type patchAverage;
|
||||
functionObjectLibs
|
||||
(
|
||||
"libsimpleFunctionObjects.so"
|
||||
);
|
||||
verbose true;
|
||||
patches
|
||||
(
|
||||
inlet
|
||||
outlet
|
||||
);
|
||||
fields // name of temp field
|
||||
(
|
||||
T
|
||||
);
|
||||
factor 1;
|
||||
}*/
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,49 @@
|
||||
/*--------------------------------*- 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;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n ( 2 2 1 );
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots ( );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,78 @@
|
||||
/*--------------------------------*- 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((viscousTerm*dev(grad(U).T()))) Gauss linear;
|
||||
div((nu*dev(grad(U).T()))) Gauss linear;
|
||||
div(phi,T) Gauss limitedLinear 1;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
laplacian(nuEff,U) Gauss linear corrected;
|
||||
laplacian(viscousTerm,U) Gauss linear corrected;
|
||||
laplacian(nu,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;
|
||||
laplacian((DT*voidfraction),T) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
interpolate(U) linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p ;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,93 @@
|
||||
/*--------------------------------*- 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
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
k
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
epsilon
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
R
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
nuTilda
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-05;
|
||||
relTol 0;
|
||||
}
|
||||
T
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PISO
|
||||
{
|
||||
nCorrectors 4;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pRefCell 0;
|
||||
pRefValue 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
82
tutorials/cfdemSolverPisoScalar/packedBedTemp/DEM/in.liggghts_init
Executable file
82
tutorials/cfdemSolverPisoScalar/packedBedTemp/DEM/in.liggghts_init
Executable file
@ -0,0 +1,82 @@
|
||||
|
||||
# read packed bed and calc convective heat transfer
|
||||
|
||||
atom_style granular
|
||||
atom_modify map array
|
||||
communicate single vel yes
|
||||
boundary m m m
|
||||
newton off
|
||||
echo both
|
||||
units si
|
||||
processors 1 1 2
|
||||
|
||||
#read the restart file
|
||||
read_restart ../DEM/liggghts.restart
|
||||
|
||||
#region reg block 0 0.1 0 0.1 0 0.1 units box
|
||||
#create_box 1 reg
|
||||
|
||||
neighbor 0.003 bin
|
||||
neigh_modify delay 0 binsize 0.01
|
||||
|
||||
|
||||
#Material properties required for new pair styles
|
||||
|
||||
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/hertz/history 1 0 #Hertzian without cohesion
|
||||
pair_coeff * *
|
||||
|
||||
#timestep, gravity
|
||||
timestep 0.00001
|
||||
fix gravi all gravity 9.81 vector 0. 0. -1.
|
||||
|
||||
#walls
|
||||
fix xwalls all wall/gran/hertz/history 1 0 xplane 0. 0.1 1
|
||||
fix ywalls all wall/gran/hertz/history 1 0 yplane 0. 0.1 1
|
||||
fix zwalls all wall/gran/hertz/history 1 0 zplane 0. 1.1 1 #temperature 283
|
||||
|
||||
|
||||
#heat transfer
|
||||
fix ftco all property/global thermalConductivity peratomtype 5. # lambda in [W/(K*m)]
|
||||
fix ftca all property/global thermalCapacity peratomtype 0.1 # cp in [J/(kg*K)]
|
||||
fix heattransfer all heat/gran 600.
|
||||
|
||||
#set particle temperature for the bed
|
||||
run 0
|
||||
region total block INF INF INF INF INF INF units box
|
||||
set region total property/atom Temp 600. # former property/paratom
|
||||
|
||||
#cfd coupling
|
||||
fix cfd all couple/cfd couple_every 100 mpi
|
||||
fix cfd2 all couple/cfd/force
|
||||
|
||||
#this one invokes heat transfer calculation, transfers per-particle temperature and adds convective heat flux to particles
|
||||
fix cfd3 all couple/cfd/convection T0 600
|
||||
|
||||
#variable vx equal vx[1]
|
||||
#variable vy equal vy[1]
|
||||
#variable vz equal vz[1]
|
||||
#variable time equal step*dt
|
||||
#fix extra all print 500 "${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 1 all erotate/sphere
|
||||
thermo_style custom step atoms ke c_1 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 1
|
||||
dump dmp all custom 10000 ../DEM/post/dump.liggghts_init id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius f_Temp[0] f_heatFlux[0]
|
||||
|
||||
run 1
|
||||
Binary file not shown.
@ -0,0 +1 @@
|
||||
dummyfile
|
||||
103
tutorials/cfdemSolverPisoScalar/packedBedTemp/parCFDDEMrun.sh
Normal file
103
tutorials/cfdemSolverPisoScalar/packedBedTemp/parCFDDEMrun.sh
Normal file
@ -0,0 +1,103 @@
|
||||
#!/bin/bash
|
||||
|
||||
#===================================================================#
|
||||
# allrun script for testcase as part of test routine
|
||||
# run settlingTest CFD part
|
||||
# Christoph Goniva - May. 2011
|
||||
#===================================================================#
|
||||
|
||||
#- source CFDEM env vars
|
||||
. ~/.bashrc
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/etc/functions.sh
|
||||
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
|
||||
logpath=$casePath
|
||||
headerText="run_parallel_cfdemSolverPisoScalar_packedBedTemp_CFDDEM"
|
||||
logfileName="log_$headerText"
|
||||
solverName="cfdemSolverPisoScalar"
|
||||
nrProcs="2"
|
||||
machineFileName="none" # yourMachinefileName | none
|
||||
debugMode="off" # on | off
|
||||
testHarnessPath="$CFDEM_TEST_HARNESS_PATH"
|
||||
runOctave="true"
|
||||
postproc="false"
|
||||
#--------------------------------------------------------------------------------#
|
||||
|
||||
#- call function to run a parallel CFD-DEM case
|
||||
parCFDDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName $debugMode
|
||||
|
||||
#------------------------------#
|
||||
if [ $runOctave == "true" ]
|
||||
then
|
||||
|
||||
#- change path
|
||||
cd octave
|
||||
|
||||
#- rmove old graph
|
||||
rm *.eps
|
||||
|
||||
#- run octave
|
||||
octave totalPressureDropAndNusselt.m
|
||||
|
||||
#- show plots
|
||||
evince cfdemSolverPisoScalar_Nusselt.eps &
|
||||
evince cfdemSolverPisoScalar_pressureDrop.eps
|
||||
#------------------------------#
|
||||
|
||||
#- copy log file to test harness
|
||||
cp ../../$logfileName $testHarnessPath
|
||||
cp cfdemSolverPisoScalar_Nusselt.eps $testHarnessPath
|
||||
cp cfdemSolverPisoScalar_pressureDrop.eps $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_init
|
||||
|
||||
#- get VTK data from CFD sim
|
||||
cd $casePath/CFD
|
||||
foamToVTK #- serial run of foamToVTK
|
||||
#source $CFDEM_SRC_DIR/etc/functions.sh #- include functions
|
||||
#pseudoParallelRun "foamToVTK" $nrPostProcProcessors #- pseudo parallel 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
|
||||
echo "deleting data at: $casePath : ???\n"
|
||||
rm -r $casePath/CFD/0.*
|
||||
rm -r $casePath/CFD/octave/*.eps
|
||||
rm -r $casePath/CFD/octave/octave-core
|
||||
rm -r $casePath/CFD/VTK
|
||||
rm -r $casePath/CFD/processor*
|
||||
rm -r $casePath/DEM/post/*
|
||||
rm -r $casePath/DEM/log.*
|
||||
rm -r $casePath/CFD/log.*
|
||||
rm -r $casePath/DEM/log.*
|
||||
rm -r $casePath/CFD/probes
|
||||
rm -r $casePath/log_*
|
||||
echo "done"
|
||||
|
||||
#- preserve post directory
|
||||
echo "dummyfile" >> $casePath/DEM/post/dummy
|
||||
|
||||
|
||||
Reference in New Issue
Block a user