Hopefully fixing merge problems.

This commit is contained in:
Thomas Lichtenegger
2016-05-13 19:01:59 +02:00
8 changed files with 154 additions and 38 deletions

View File

@ -5,7 +5,7 @@
volScalarField& he = thermo.he();
particleCloud.energyContributions(Qsource);
thDiff=particleCloud.thermCondM().thermDiff();
thDiff=rhoeps*particleCloud.thermCondM().thermDiff();
thDiff.correctBoundaryConditions();
fvScalarMatrix EEqn
@ -25,14 +25,14 @@
// net heat transfer from particles to fluid
- Qsource
// thermal conduction of the fluid with effective conductivity
- fvc::laplacian(rhoeps*thDiff,he)
- fvc::laplacian(thDiff,he)
// + particle-fluid energy transfer due to work
// + fluid energy dissipation due to shearing
==
fvOptions(rho, he)
);
Info << "\nX\n" << endl;
EEqn.relax();
fvOptions.constrain(EEqn);

View File

@ -74,14 +74,14 @@ species::species
(
IOobject
(
"changeOfGasMassField_",
"changeOfGasMassField",
mesh_.time().timeName(),
mesh_,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
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")),
tempField_(sm.mesh().lookupObject<volScalarField> (tempFieldName_)),
@ -116,7 +116,7 @@ species::species
(
IOobject
(
"New"+Y_[i].name(),
"ModSpeciesMassField_"+Y_[i].name(),
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
@ -170,8 +170,6 @@ void species::execute()
scalar rhofluid(0);
List<scalar> Yfluid_;
Yfluid_.setSize(speciesNames_.size());
List<scalar> changedField_;
changedField_.setSize(speciesNames_.size());
// defining interpolators for T, rho
interpolationCellPoint <scalar> TInterpolator_(tempField_);
@ -192,7 +190,6 @@ void species::execute()
{
Tfluid = tempField_[cellI];
rhofluid=rho_[cellI];
for (int i=0; i<speciesNames_.size();i++)
}
//fill arrays
@ -201,7 +198,7 @@ void species::execute()
for (int i=0; i<speciesNames_.size();i++)
{
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++)
{
particleCloud_.dataExchangeM().getData(Y_[i].name(),"scalar-atom",changeOfSpeciesMass_[i]);
changeOfSpeciesMassFields_[i].internalField() = 0.0;
changeOfSpeciesMassFields_[i].boundaryField() = 0.0;
particleCloud_.averagingM().setScalarSum
@ -230,11 +226,12 @@ void species::execute()
particleCloud_.particleWeights(),
NULL
);
// take care for implementation in LIGGGHTS: species produced from particles defined positive
changeOfSpeciesMassFields_[i].internalField() /= changeOfSpeciesMassFields_[i].mesh().V();
changeOfSpeciesMassFields_[i].correctBoundaryConditions();
changeOfSpeciesMassFields_[i].correctBoundaryConditions();
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;
}
}

View File

@ -63,12 +63,26 @@ heatTransferGunn::heatTransferGunn
"particleTemp",
sm.mesh().time().timeName(),
sm.mesh(),
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
IOobject::NO_READ,
IOobject::NO_WRITE
),
sm.mesh(),
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")),
tempField_(sm.mesh().lookupObject<volScalarField> (tempFieldName_)),
voidfractionFieldName_(propsDict_.lookupOrDefault<word>("voidfractionFieldName","voidfraction")),
@ -90,6 +104,14 @@ heatTransferGunn::heatTransferGunn
maxSource_=readScalar(propsDict_.lookup ("maxSource"));
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
particleCloud_.dataExchangeM().getData(partTempName_,"scalar-atom",partTemp_);
double **particleWeights=particleCloud_.particleWeights();
particleCloud_.averagingM().resetWeightFields();
particleCloud_.averagingM().setScalarAverage
(
partTempField_,
partTemp_,
particleWeights,
particleCloud_.averagingM().UsWeightField(),
NULL
);
if(calcPartTempField_)
{
scalar aveTemp(0.0);
for(int index = 0;index < particleCloud_.numberOfParticles(); ++index)
aveTemp += partTemp_[index][0];
aveTemp /= particleCloud_.numberOfParticles();
partTempField_.internalField() = 0.0;
double **particleWeights=particleCloud_.particleWeights();
particleCloud_.averagingM().resetWeightFields();
particleCloud_.averagingM().setScalarAverage
(
partTempField_,
partTemp_,
particleCloud_.particleWeights(),
particleCloud_.averagingM().UsWeightField(),
NULL
);
partRelTempField_ = (partTempField_ - aveTemp) / (aveTemp - partRefTemp_);
}
#ifdef compre
const volScalarField mufField = particleCloud_.turbulence().mu();

View File

@ -52,6 +52,12 @@ private:
volScalarField QPartFluid_;
volScalarField partTempField_;
volScalarField partRelTempField_;
scalar partRefTemp_;
bool calcPartTempField_;
word tempFieldName_;

View File

@ -53,9 +53,59 @@ noThermCond::~noThermCond()
// * * * * * * * * * * * * * * * * 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;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,8 +1,13 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
<<<<<<< HEAD
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
=======
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
>>>>>>> 8eb000e27b9eff183742ea5b6406b9d058456b80
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
@ -10,32 +15,54 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
<<<<<<< HEAD
object thDiff;
=======
location "0";
object T;
>>>>>>> 8eb000e27b9eff183742ea5b6406b9d058456b80
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
<<<<<<< HEAD
internalField uniform 0.0;
=======
internalField uniform 0;
>>>>>>> 8eb000e27b9eff183742ea5b6406b9d058456b80
boundaryField
{
top
{
type fixedValue;
<<<<<<< HEAD
value uniform 6e-05;
=======
value uniform 2.3e-5;
>>>>>>> 8eb000e27b9eff183742ea5b6406b9d058456b80
}
bottom
{
type fixedValue;
<<<<<<< HEAD
value uniform 6e-05;
=======
value uniform 2.3e-5;
>>>>>>> 8eb000e27b9eff183742ea5b6406b9d058456b80
}
walls
{
type fixedValue;
<<<<<<< HEAD
value uniform 6e-05;
=======
value uniform 2.3e-5;
>>>>>>> 8eb000e27b9eff183742ea5b6406b9d058456b80
}
symmetry
@ -49,6 +76,11 @@ boundaryField
}
}
<<<<<<< HEAD
// ************************************************************************* //
=======
// ************************************************************************* //
>>>>>>> 8eb000e27b9eff183742ea5b6406b9d058456b80

View File

@ -39,7 +39,7 @@ divSchemes
div(phi,Yi_h) Gauss upwind;
div((muEff*dev2(T(grad(U))))) 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

View File

@ -81,14 +81,14 @@ if [ $postproc == "true" ]
fi
#- clean up case
echo "deleting data at: $casePath :\n"
source $WM_PROJECT_DIR/bin/tools/CleanFunctions
cd $casePath/CFD
cleanCase
rm -r $casePath/CFD/clockData
rm $casePath/DEM/post/*.*
touch $casePath/DEM/post/.gitignore
#echo "deleting data at: $casePath :\n"
#source $WM_PROJECT_DIR/bin/tools/CleanFunctions
#cd $casePath/CFD
#cleanCase
#rm -r $casePath/CFD/clockData
#rm $casePath/DEM/post/*.*
#touch $casePath/DEM/post/.gitignore
#rm $casePath/DEM/post/restart/*.*
rm $casePath/DEM/post/restart/liggghts.restartCFDEM*
touch $casePath/DEM/post/restart/.gitignore
echo "done"
#rm $casePath/DEM/post/restart/liggghts.restartCFDEM*
#touch $casePath/DEM/post/restart/.gitignore
#echo "done"