mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
Hopefully fixing merge problems.
This commit is contained in:
@ -5,7 +5,7 @@
|
|||||||
volScalarField& he = thermo.he();
|
volScalarField& he = thermo.he();
|
||||||
particleCloud.energyContributions(Qsource);
|
particleCloud.energyContributions(Qsource);
|
||||||
|
|
||||||
thDiff=particleCloud.thermCondM().thermDiff();
|
thDiff=rhoeps*particleCloud.thermCondM().thermDiff();
|
||||||
thDiff.correctBoundaryConditions();
|
thDiff.correctBoundaryConditions();
|
||||||
|
|
||||||
fvScalarMatrix EEqn
|
fvScalarMatrix EEqn
|
||||||
@ -25,14 +25,14 @@
|
|||||||
// net heat transfer from particles to fluid
|
// net heat transfer from particles to fluid
|
||||||
- Qsource
|
- Qsource
|
||||||
// thermal conduction of the fluid with effective conductivity
|
// thermal conduction of the fluid with effective conductivity
|
||||||
- fvc::laplacian(rhoeps*thDiff,he)
|
- fvc::laplacian(thDiff,he)
|
||||||
|
|
||||||
// + particle-fluid energy transfer due to work
|
// + particle-fluid energy transfer due to work
|
||||||
// + fluid energy dissipation due to shearing
|
// + fluid energy dissipation due to shearing
|
||||||
==
|
==
|
||||||
fvOptions(rho, he)
|
fvOptions(rho, he)
|
||||||
);
|
);
|
||||||
|
Info << "\nX\n" << endl;
|
||||||
EEqn.relax();
|
EEqn.relax();
|
||||||
|
|
||||||
fvOptions.constrain(EEqn);
|
fvOptions.constrain(EEqn);
|
||||||
|
|||||||
@ -74,14 +74,14 @@ species::species
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"changeOfGasMassField_",
|
"changeOfGasMassField",
|
||||||
mesh_.time().timeName(),
|
mesh_.time().timeName(),
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::READ_IF_PRESENT,
|
IOobject::READ_IF_PRESENT,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::AUTO_WRITE
|
||||||
),
|
),
|
||||||
mesh_,
|
mesh_,
|
||||||
dimensionedScalar("zero",dimensionSet(0,0,0,0,0,0,0),0.0)
|
dimensionedScalar("zero",dimMass/dimTime,0.0)
|
||||||
),
|
),
|
||||||
tempFieldName_(propsDict_.lookupOrDefault<word>("tempFieldName","T")),
|
tempFieldName_(propsDict_.lookupOrDefault<word>("tempFieldName","T")),
|
||||||
tempField_(sm.mesh().lookupObject<volScalarField> (tempFieldName_)),
|
tempField_(sm.mesh().lookupObject<volScalarField> (tempFieldName_)),
|
||||||
@ -116,7 +116,7 @@ species::species
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"New"+Y_[i].name(),
|
"ModSpeciesMassField_"+Y_[i].name(),
|
||||||
mesh_.time().timeName(),
|
mesh_.time().timeName(),
|
||||||
mesh_,
|
mesh_,
|
||||||
IOobject::NO_READ,
|
IOobject::NO_READ,
|
||||||
@ -170,8 +170,6 @@ void species::execute()
|
|||||||
scalar rhofluid(0);
|
scalar rhofluid(0);
|
||||||
List<scalar> Yfluid_;
|
List<scalar> Yfluid_;
|
||||||
Yfluid_.setSize(speciesNames_.size());
|
Yfluid_.setSize(speciesNames_.size());
|
||||||
List<scalar> changedField_;
|
|
||||||
changedField_.setSize(speciesNames_.size());
|
|
||||||
|
|
||||||
// defining interpolators for T, rho
|
// defining interpolators for T, rho
|
||||||
interpolationCellPoint <scalar> TInterpolator_(tempField_);
|
interpolationCellPoint <scalar> TInterpolator_(tempField_);
|
||||||
@ -192,7 +190,6 @@ void species::execute()
|
|||||||
{
|
{
|
||||||
Tfluid = tempField_[cellI];
|
Tfluid = tempField_[cellI];
|
||||||
rhofluid=rho_[cellI];
|
rhofluid=rho_[cellI];
|
||||||
for (int i=0; i<speciesNames_.size();i++)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//fill arrays
|
//fill arrays
|
||||||
@ -201,7 +198,7 @@ void species::execute()
|
|||||||
for (int i=0; i<speciesNames_.size();i++)
|
for (int i=0; i<speciesNames_.size();i++)
|
||||||
{
|
{
|
||||||
Yfluid_[i] = Y_[i][cellI];
|
Yfluid_[i] = Y_[i][cellI];
|
||||||
concentrations_[i][index][0]=Yfluid_[i];
|
concentrations_[i][index][0]=Yfluid_[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -220,7 +217,6 @@ void species::execute()
|
|||||||
for (int i=0; i<speciesNames_.size();i++)
|
for (int i=0; i<speciesNames_.size();i++)
|
||||||
{
|
{
|
||||||
particleCloud_.dataExchangeM().getData(Y_[i].name(),"scalar-atom",changeOfSpeciesMass_[i]);
|
particleCloud_.dataExchangeM().getData(Y_[i].name(),"scalar-atom",changeOfSpeciesMass_[i]);
|
||||||
|
|
||||||
changeOfSpeciesMassFields_[i].internalField() = 0.0;
|
changeOfSpeciesMassFields_[i].internalField() = 0.0;
|
||||||
changeOfSpeciesMassFields_[i].boundaryField() = 0.0;
|
changeOfSpeciesMassFields_[i].boundaryField() = 0.0;
|
||||||
particleCloud_.averagingM().setScalarSum
|
particleCloud_.averagingM().setScalarSum
|
||||||
@ -230,11 +226,12 @@ void species::execute()
|
|||||||
particleCloud_.particleWeights(),
|
particleCloud_.particleWeights(),
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
// take care for implementation in LIGGGHTS: species produced from particles defined positive
|
// take care for implementation in LIGGGHTS: species produced from particles defined positive
|
||||||
changeOfSpeciesMassFields_[i].internalField() /= changeOfSpeciesMassFields_[i].mesh().V();
|
changeOfSpeciesMassFields_[i].internalField() /= changeOfSpeciesMassFields_[i].mesh().V();
|
||||||
changeOfSpeciesMassFields_[i].correctBoundaryConditions();
|
changeOfSpeciesMassFields_[i].correctBoundaryConditions();
|
||||||
changeOfGasMassField_ += changeOfSpeciesMassFields_[i];
|
changeOfGasMassField_ += changeOfSpeciesMassFields_[i];
|
||||||
Info << "total conversion of species " << speciesNames_[i] << " = " << gSum(changeOfSpeciesMassFields_[i]*1.0*changeOfSpeciesMassFields_[i].mesh().V()) << endl;
|
Info << "total conversion of species" << speciesNames_[i] << " = " << gSum(changeOfSpeciesMassFields_[i]*1.0*changeOfSpeciesMassFields_[i].mesh().V()) << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -63,12 +63,26 @@ heatTransferGunn::heatTransferGunn
|
|||||||
"particleTemp",
|
"particleTemp",
|
||||||
sm.mesh().time().timeName(),
|
sm.mesh().time().timeName(),
|
||||||
sm.mesh(),
|
sm.mesh(),
|
||||||
IOobject::READ_IF_PRESENT,
|
IOobject::NO_READ,
|
||||||
IOobject::AUTO_WRITE
|
IOobject::NO_WRITE
|
||||||
),
|
),
|
||||||
sm.mesh(),
|
sm.mesh(),
|
||||||
dimensionedScalar("zero", dimensionSet(0,0,0,1,0,0,0), 0.0)
|
dimensionedScalar("zero", dimensionSet(0,0,0,1,0,0,0), 0.0)
|
||||||
),
|
),
|
||||||
|
partRelTempField_
|
||||||
|
( IOobject
|
||||||
|
(
|
||||||
|
"particleRelTemp",
|
||||||
|
sm.mesh().time().timeName(),
|
||||||
|
sm.mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
sm.mesh(),
|
||||||
|
dimensionedScalar("zero", dimensionSet(0,0,0,1,0,0,0), 0.0)
|
||||||
|
),
|
||||||
|
partRefTemp_(0.0),
|
||||||
|
calcPartTempField_(propsDict_.lookupOrDefault<bool>("calcPartTempField",false)),
|
||||||
tempFieldName_(propsDict_.lookupOrDefault<word>("tempFieldName","T")),
|
tempFieldName_(propsDict_.lookupOrDefault<word>("tempFieldName","T")),
|
||||||
tempField_(sm.mesh().lookupObject<volScalarField> (tempFieldName_)),
|
tempField_(sm.mesh().lookupObject<volScalarField> (tempFieldName_)),
|
||||||
voidfractionFieldName_(propsDict_.lookupOrDefault<word>("voidfractionFieldName","voidfraction")),
|
voidfractionFieldName_(propsDict_.lookupOrDefault<word>("voidfractionFieldName","voidfraction")),
|
||||||
@ -90,6 +104,14 @@ heatTransferGunn::heatTransferGunn
|
|||||||
maxSource_=readScalar(propsDict_.lookup ("maxSource"));
|
maxSource_=readScalar(propsDict_.lookup ("maxSource"));
|
||||||
Info << "limiting eulerian source field to: " << maxSource_ << endl;
|
Info << "limiting eulerian source field to: " << maxSource_ << endl;
|
||||||
}
|
}
|
||||||
|
if (calcPartTempField_)
|
||||||
|
{
|
||||||
|
if (propsDict_.found("partRefTemp"))
|
||||||
|
partRefTemp_=readScalar(propsDict_.lookup ("partRefTemp"));
|
||||||
|
partTempField_.writeOpt() = 0;
|
||||||
|
partRelTempField_.writeOpt() = 0;
|
||||||
|
Info << "Particle temperature field activated." << endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -123,16 +145,25 @@ void heatTransferGunn::calcEnergyContribution()
|
|||||||
// get DEM data
|
// get DEM data
|
||||||
particleCloud_.dataExchangeM().getData(partTempName_,"scalar-atom",partTemp_);
|
particleCloud_.dataExchangeM().getData(partTempName_,"scalar-atom",partTemp_);
|
||||||
|
|
||||||
double **particleWeights=particleCloud_.particleWeights();
|
if(calcPartTempField_)
|
||||||
particleCloud_.averagingM().resetWeightFields();
|
{
|
||||||
particleCloud_.averagingM().setScalarAverage
|
scalar aveTemp(0.0);
|
||||||
(
|
for(int index = 0;index < particleCloud_.numberOfParticles(); ++index)
|
||||||
partTempField_,
|
aveTemp += partTemp_[index][0];
|
||||||
partTemp_,
|
aveTemp /= particleCloud_.numberOfParticles();
|
||||||
particleWeights,
|
partTempField_.internalField() = 0.0;
|
||||||
particleCloud_.averagingM().UsWeightField(),
|
double **particleWeights=particleCloud_.particleWeights();
|
||||||
NULL
|
particleCloud_.averagingM().resetWeightFields();
|
||||||
);
|
particleCloud_.averagingM().setScalarAverage
|
||||||
|
(
|
||||||
|
partTempField_,
|
||||||
|
partTemp_,
|
||||||
|
particleCloud_.particleWeights(),
|
||||||
|
particleCloud_.averagingM().UsWeightField(),
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
partRelTempField_ = (partTempField_ - aveTemp) / (aveTemp - partRefTemp_);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef compre
|
#ifdef compre
|
||||||
const volScalarField mufField = particleCloud_.turbulence().mu();
|
const volScalarField mufField = particleCloud_.turbulence().mu();
|
||||||
|
|||||||
@ -52,6 +52,12 @@ private:
|
|||||||
volScalarField QPartFluid_;
|
volScalarField QPartFluid_;
|
||||||
|
|
||||||
volScalarField partTempField_;
|
volScalarField partTempField_;
|
||||||
|
|
||||||
|
volScalarField partRelTempField_;
|
||||||
|
|
||||||
|
scalar partRefTemp_;
|
||||||
|
|
||||||
|
bool calcPartTempField_;
|
||||||
|
|
||||||
word tempFieldName_;
|
word tempFieldName_;
|
||||||
|
|
||||||
|
|||||||
@ -53,9 +53,59 @@ noThermCond::~noThermCond()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Member Fct * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Member Fct * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
tmp<volScalarField> noThermCond::thermCond() const{return volScalarField::null();}
|
tmp<volScalarField> noThermCond::thermCond() const
|
||||||
|
{
|
||||||
|
tmp<volScalarField> tcond
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"fake1",
|
||||||
|
particleCloud_.mesh().time().timeName(),
|
||||||
|
particleCloud_.mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
particleCloud_.mesh(),
|
||||||
|
dimensionedScalar
|
||||||
|
(
|
||||||
|
"zero",
|
||||||
|
dimensionSet(0,2,-1,0,0,0,0),
|
||||||
|
0.0
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
tmp<volScalarField> noThermCond::thermDiff() const{return volScalarField::null();}
|
return tcond;
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp<volScalarField> noThermCond::thermDiff() const
|
||||||
|
{
|
||||||
|
tmp<volScalarField> tdif
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"fake1",
|
||||||
|
particleCloud_.mesh().time().timeName(),
|
||||||
|
particleCloud_.mesh(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
|
particleCloud_.mesh(),
|
||||||
|
dimensionedScalar
|
||||||
|
(
|
||||||
|
"zero",
|
||||||
|
dimensionSet(0,2,-1,0,0,0,0),
|
||||||
|
0.0
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return tdif;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
|
<<<<<<< HEAD
|
||||||
| \\ / O peration | Version: 1.6 |
|
| \\ / O peration | Version: 1.6 |
|
||||||
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
| \\ / A nd | Web: http://www.OpenFOAM.org |
|
||||||
|
=======
|
||||||
|
| \\ / O peration | Version: 2.3.0 |
|
||||||
|
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||||
|
>>>>>>> 8eb000e27b9eff183742ea5b6406b9d058456b80
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
FoamFile
|
FoamFile
|
||||||
@ -10,32 +15,54 @@ FoamFile
|
|||||||
version 2.0;
|
version 2.0;
|
||||||
format ascii;
|
format ascii;
|
||||||
class volScalarField;
|
class volScalarField;
|
||||||
|
<<<<<<< HEAD
|
||||||
object thDiff;
|
object thDiff;
|
||||||
|
=======
|
||||||
|
location "0";
|
||||||
|
object T;
|
||||||
|
>>>>>>> 8eb000e27b9eff183742ea5b6406b9d058456b80
|
||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
dimensions [0 2 -1 0 0 0 0];
|
dimensions [0 2 -1 0 0 0 0];
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
internalField uniform 0.0;
|
internalField uniform 0.0;
|
||||||
|
=======
|
||||||
|
internalField uniform 0;
|
||||||
|
>>>>>>> 8eb000e27b9eff183742ea5b6406b9d058456b80
|
||||||
|
|
||||||
boundaryField
|
boundaryField
|
||||||
{
|
{
|
||||||
top
|
top
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
|
<<<<<<< HEAD
|
||||||
value uniform 6e-05;
|
value uniform 6e-05;
|
||||||
|
=======
|
||||||
|
value uniform 2.3e-5;
|
||||||
|
>>>>>>> 8eb000e27b9eff183742ea5b6406b9d058456b80
|
||||||
}
|
}
|
||||||
|
|
||||||
bottom
|
bottom
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
|
<<<<<<< HEAD
|
||||||
value uniform 6e-05;
|
value uniform 6e-05;
|
||||||
|
=======
|
||||||
|
value uniform 2.3e-5;
|
||||||
|
>>>>>>> 8eb000e27b9eff183742ea5b6406b9d058456b80
|
||||||
}
|
}
|
||||||
|
|
||||||
walls
|
walls
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type fixedValue;
|
||||||
|
<<<<<<< HEAD
|
||||||
value uniform 6e-05;
|
value uniform 6e-05;
|
||||||
|
=======
|
||||||
|
value uniform 2.3e-5;
|
||||||
|
|
||||||
|
>>>>>>> 8eb000e27b9eff183742ea5b6406b9d058456b80
|
||||||
}
|
}
|
||||||
|
|
||||||
symmetry
|
symmetry
|
||||||
@ -49,6 +76,11 @@ boundaryField
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
|
>>>>>>> 8eb000e27b9eff183742ea5b6406b9d058456b80
|
||||||
|
|||||||
@ -39,7 +39,7 @@ divSchemes
|
|||||||
div(phi,Yi_h) Gauss upwind;
|
div(phi,Yi_h) Gauss upwind;
|
||||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||||
div((viscousTerm*dev2(grad(U).T()))) Gauss linear;
|
div((viscousTerm*dev2(grad(U).T()))) Gauss linear;
|
||||||
div((thermo:mu*dev(grad(U).T()))) Gauss linear;
|
div((thermo:mu*dev(grad(U).T()))) Gauss linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
laplacianSchemes
|
laplacianSchemes
|
||||||
|
|||||||
@ -81,14 +81,14 @@ if [ $postproc == "true" ]
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#- clean up case
|
#- clean up case
|
||||||
echo "deleting data at: $casePath :\n"
|
#echo "deleting data at: $casePath :\n"
|
||||||
source $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
#source $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||||
cd $casePath/CFD
|
#cd $casePath/CFD
|
||||||
cleanCase
|
#cleanCase
|
||||||
rm -r $casePath/CFD/clockData
|
#rm -r $casePath/CFD/clockData
|
||||||
rm $casePath/DEM/post/*.*
|
#rm $casePath/DEM/post/*.*
|
||||||
touch $casePath/DEM/post/.gitignore
|
#touch $casePath/DEM/post/.gitignore
|
||||||
#rm $casePath/DEM/post/restart/*.*
|
#rm $casePath/DEM/post/restart/*.*
|
||||||
rm $casePath/DEM/post/restart/liggghts.restartCFDEM*
|
#rm $casePath/DEM/post/restart/liggghts.restartCFDEM*
|
||||||
touch $casePath/DEM/post/restart/.gitignore
|
#touch $casePath/DEM/post/restart/.gitignore
|
||||||
echo "done"
|
#echo "done"
|
||||||
|
|||||||
Reference in New Issue
Block a user