diff --git a/applications/solvers/cfdemSolverRhoPimple/EEqn.H b/applications/solvers/cfdemSolverRhoPimple/EEqn.H index f70226b0..076d5883 100644 --- a/applications/solvers/cfdemSolverRhoPimple/EEqn.H +++ b/applications/solvers/cfdemSolverRhoPimple/EEqn.H @@ -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); diff --git a/src/lagrangian/cfdemParticle/subModels/chemistryModel/species/species.C b/src/lagrangian/cfdemParticle/subModels/chemistryModel/species/species.C index 968305e5..f66c002b 100644 --- a/src/lagrangian/cfdemParticle/subModels/chemistryModel/species/species.C +++ b/src/lagrangian/cfdemParticle/subModels/chemistryModel/species/species.C @@ -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("tempFieldName","T")), tempField_(sm.mesh().lookupObject (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 Yfluid_; Yfluid_.setSize(speciesNames_.size()); - List changedField_; - changedField_.setSize(speciesNames_.size()); // defining interpolators for T, rho interpolationCellPoint TInterpolator_(tempField_); @@ -192,7 +190,6 @@ void species::execute() { Tfluid = tempField_[cellI]; rhofluid=rho_[cellI]; - for (int i=0; i("calcPartTempField",false)), tempFieldName_(propsDict_.lookupOrDefault("tempFieldName","T")), tempField_(sm.mesh().lookupObject (tempFieldName_)), voidfractionFieldName_(propsDict_.lookupOrDefault("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(); diff --git a/src/lagrangian/cfdemParticle/subModels/energyModel/heatTransferGunn/heatTransferGunn.H b/src/lagrangian/cfdemParticle/subModels/energyModel/heatTransferGunn/heatTransferGunn.H index 0edd2d75..cf138a80 100644 --- a/src/lagrangian/cfdemParticle/subModels/energyModel/heatTransferGunn/heatTransferGunn.H +++ b/src/lagrangian/cfdemParticle/subModels/energyModel/heatTransferGunn/heatTransferGunn.H @@ -52,6 +52,12 @@ private: volScalarField QPartFluid_; volScalarField partTempField_; + + volScalarField partRelTempField_; + + scalar partRefTemp_; + + bool calcPartTempField_; word tempFieldName_; diff --git a/src/lagrangian/cfdemParticle/subModels/thermCondModel/noTherm/noThermCond.C b/src/lagrangian/cfdemParticle/subModels/thermCondModel/noTherm/noThermCond.C index ffad2d57..63d40b02 100644 --- a/src/lagrangian/cfdemParticle/subModels/thermCondModel/noTherm/noThermCond.C +++ b/src/lagrangian/cfdemParticle/subModels/thermCondModel/noTherm/noThermCond.C @@ -53,9 +53,59 @@ noThermCond::~noThermCond() // * * * * * * * * * * * * * * * * Member Fct * * * * * * * * * * * * * * * // -tmp noThermCond::thermCond() const{return volScalarField::null();} +tmp noThermCond::thermCond() const +{ + tmp 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 noThermCond::thermDiff() const{return volScalarField::null();} + return tcond; +} + +tmp noThermCond::thermDiff() const +{ + tmp 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; +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/0/thDiff b/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/0/thDiff index c206de3d..c014ecff 100755 --- a/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/0/thDiff +++ b/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/0/thDiff @@ -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 diff --git a/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/system/fvSchemes b/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/system/fvSchemes index 9b35fe62..545e18ea 100644 --- a/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/system/fvSchemes +++ b/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/system/fvSchemes @@ -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 diff --git a/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/parCFDDEMrun.sh b/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/parCFDDEMrun.sh index fe1d189d..f87dd161 100644 --- a/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/parCFDDEMrun.sh +++ b/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/parCFDDEMrun.sh @@ -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"