|
[Sponsors] |
April 6, 2017, 08:35 |
Add curvature term to bEqn?
|
#1 |
Member
Join Date: Oct 2015
Location: Finland
Posts: 39
Rep Power: 11 |
Hey all,
I am trying to modify bEqn.H file inside the XiFoam solver to add curvature effect kappa into the b scalar calculation. the term I am trying to add is the following: which can be written as : I want to use the already calculated b and n fields inside the bEqn.H from the following lines: Code:
volVectorField n("n", fvc::grad(b)); volScalarField mgb(mag(n)); dimensionedScalar dMgb = 1.0e-3* (b*c*mgb)().weightedAverage(mesh.V()) /((b*c)().weightedAverage(mesh.V()) + SMALL) + dimensionedScalar("ddMgb", mgb.dimensions(), SMALL); mgb += dMgb; surfaceVectorField SfHat(mesh.Sf()/mesh.magSf()); surfaceVectorField nfVec(fvc::interpolate(n)); nfVec += SfHat*(fvc::snGrad(b) - (SfHat & nfVec)); nfVec /= (mag(nfVec) + dMgb); surfaceScalarField nf((mesh.Sf() & nfVec)); n /= mgb; #include "StCorr.H" // Calculate turbulent flame speed flux // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ surfaceScalarField phiSt("phiSt", fvc::interpolate(rhou*StCorr*Su*Xi)*nf); scalar StCoNum = max ( mesh.surfaceInterpolation::deltaCoeffs() *mag(phiSt)/(fvc::interpolate(rho)*mesh.magSf()) ).value()*runTime.deltaTValue(); Info<< "Max St-Courant Number = " << StCoNum << endl; // Create b equation // ~~~~~~~~~~~~~~~~~ fvScalarMatrix bEqn ( fvm::ddt(rho, b) + mvConvection->fvmDiv(phi, b) + fvm::div(phiSt, b) - fvm::Sp(fvc::div(phiSt), b) - fvm::laplacian(turbulence->alphaEff(), b) == fvOptions(rho, b) ); -Bulut |
|
Tags |
beqn, combustion, progress variable, surface normal, xifoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to add a source term like this!! | arvind_arya | OpenFOAM | 1 | February 11, 2011 03:34 |
curvature correction term, material derivative of a tensor | volker | OpenFOAM Programming & Development | 7 | June 3, 2010 09:08 |
add a source term in kEpsilon model | maurice | OpenFOAM Running, Solving & CFD | 0 | May 18, 2009 08:54 |
add a source term in incompressible k-epsilon model | maurice | OpenFOAM | 0 | May 18, 2009 02:41 |
How to add source term | Smith | FLUENT | 0 | January 29, 2008 09:12 |