From b149954ec51380ed02077c9b6a1fe9dae055b6be Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Thu, 12 May 2016 14:23:37 +0200 Subject: [PATCH 1/4] Needed to include div scheme. --- .../simplifiedSiwek_in_CFDEM/CFD/system/fvSchemes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/system/fvSchemes b/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/system/fvSchemes index 94ebc29d..9b35fe62 100644 --- a/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/system/fvSchemes +++ b/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/system/fvSchemes @@ -36,9 +36,10 @@ divSchemes div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(U) Gauss linear; - div((muEff*dev2(T(grad(U))))) Gauss linear; 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; } laplacianSchemes From ac29491c96a03840058e8786944b446c7259ff0d Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Thu, 12 May 2016 14:24:10 +0200 Subject: [PATCH 2/4] Switch to Syamlal model. --- .../simplifiedSiwek_in_CFDEM/CFD/constant/couplingProperties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/constant/couplingProperties b/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/constant/couplingProperties index 98694a8d..ea2b4385 100644 --- a/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/constant/couplingProperties +++ b/tutorials/cfdemSolverRhoPimpleChem/simplifiedSiwek_in_CFDEM/CFD/constant/couplingProperties @@ -78,7 +78,7 @@ energyModels //reactionHeat ); -thermCondModel off;//SyamlalThermCond;//thermCondModel;//off; +thermCondModel SyamlalThermCond;//thermCondModel;//off; chemistryModel species; From 9e9ca2f0a4a8e5114b13459365ad7c99636d61de Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Thu, 12 May 2016 14:24:32 +0200 Subject: [PATCH 3/4] Little changes. --- applications/solvers/cfdemSolverRhoPimple/EEqn.H | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/solvers/cfdemSolverRhoPimple/EEqn.H b/applications/solvers/cfdemSolverRhoPimple/EEqn.H index 076d5883..f70226b0 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=rhoeps*particleCloud.thermCondM().thermDiff(); + thDiff=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(thDiff,he) + - fvc::laplacian(rhoeps*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); From 0530e6eed8182b1da9e8fc492b5b1c2972d79568 Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Thu, 12 May 2016 14:38:40 +0200 Subject: [PATCH 4/4] Some cleaning up. Material produced from reactions summed up and scaled by cell size. --- .../chemistryModel/species/species.C | 34 ++++--------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/src/lagrangian/cfdemParticle/subModels/chemistryModel/species/species.C b/src/lagrangian/cfdemParticle/subModels/chemistryModel/species/species.C index fc640a21..968305e5 100644 --- a/src/lagrangian/cfdemParticle/subModels/chemistryModel/species/species.C +++ b/src/lagrangian/cfdemParticle/subModels/chemistryModel/species/species.C @@ -187,27 +187,12 @@ void species::execute() vector position = particleCloud_.position(index); Tfluid = TInterpolator_.interpolate(position,cellI); rhofluid = rhoInterpolator_.interpolate(position,cellI); - - - for (int i=0;i YInterpolator_[i](Y_[i]); - // Yfluid_[i] = YInterpolator_[i].interpolate(position,cellI); - // const volScalarField& Yfluid_ = mesh_.lookupObject(speciesNames_[i]); - // interpolationCellPoint YInterpolator_(Y_[i]); - //const volScalarField& Yfluid_ = mesh_.lookupObject(Y_[i]); - // interpolationCellPoint YInterpolator_(Y_[i].name()); - // Yfluid_ = YInterpolator_.interpolate(position,cellI); - } } else { Tfluid = tempField_[cellI]; rhofluid=rho_[cellI]; for (int i=0; i changeOfSpeciesMass_[i]; - - // sum or average??? changeOfSpeciesMassFields_[i].internalField() = 0.0; + changeOfSpeciesMassFields_[i].boundaryField() = 0.0; particleCloud_.averagingM().setScalarSum ( changeOfSpeciesMassFields_[i], changeOfSpeciesMass_[i], 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(); changeOfGasMassField_ += changeOfSpeciesMassFields_[i]; - // } + Info << "total conversion of species " << speciesNames_[i] << " = " << gSum(changeOfSpeciesMassFields_[i]*1.0*changeOfSpeciesMassFields_[i].mesh().V()) << endl; } }