CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

how to make a scalar transport equation to be conserved?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 5, 2013, 07:33
Default how to make a scalar transport equation to be conserved?
  #1
Banned
 
ehsan
Join Date: Oct 2012
Location: Iran
Posts: 1,106
Rep Power: 0
immortality is an unknown quantity at this point
hello
I run a solver that has a scalar transport equation scalar but value is not between 0 and 1 as the snapshot.
how to resolve?
this is the equation I modified solver by:
Code:
// --- Scalar Transport
    tmp<fvScalarMatrix> gasEqn
    (
     fvm::ddt(rho,gas) 
             + fvm::div(phi, gas)
                -fvm::Sp(fvc::div(phi), gas)
                      - fvm::laplacian(turbulence->muEff(), gas)     
    );
    
    gasEqn().relax();
    
    gasEqn().solve(mesh.solver("gas"));
how to make it conseved so that gas(a scalar transport variable)be between 0(internalField value) and 1(inlet value)?(outlet zeroGradient.one inlet and one outlet only)
thanks.
Attached Thumbnails
immortality is offline   Reply With Quote

Old   May 5, 2013, 08:01
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 4,228
Blog Entries: 31
Rep Power: 45
wyldckat has a spectacular aura aboutwyldckat has a spectacular aura about
Hi Ehsan,

A few questions:
  1. Are you using a compressible or incompressible solver?
    1. Which solver are you using as base?
  2. What are the base fluid properties?
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   May 5, 2013, 08:04
Default
  #3
Banned
 
ehsan
Join Date: Oct 2012
Location: Iran
Posts: 1,106
Rep Power: 0
immortality is an unknown quantity at this point
hi Bruno
compressible.viscous.in both rhoCentralFoam and rhoPimpleFoam it occurs.
I had sent you the modified solvers and a case before.I think its because scalar transport equation is not conserved.maybe a term is excess or in lack!
I use janafThermo and sutherland
Code:
//thermoType      hePsiThermo<pureMixture<sutherland<janaf<perfectGas<specie>>,sensibleEnthalpy>>>;
thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       sutherland;
    thermo          janaf;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}
mixture
{
    specie
    {
        nMoles          1;
        molWeight       28.96;
    }
    thermodynamics
    {
     Tlow 200;
     Thigh 6000;
     Tcommon 1000;
     highCpCoeffs (3.129672277499967 1.211766752750042e-3 -4.04761109000018e-7 6.409571300000324e-11 -3.780447620000211e-15 -.996955811e3 5.257756413);
     lowCpCoeffs  (3.593868050000014 -8.419292810001117e-4 2.08457592775033e-6 -5.938441825004294e-10 -2.456771699998039e-13 -1.0512181e3 3.140021718);
        /*Cp              1040;
        Hf              2.544e+06;*/
    }
    transport
    {
       As 1.4584e-6;
       Ts 110.4;
        /*mu              1.84e-05;
        Pr              0.75;*/
    }
}


// ************************************************************************* //
immortality is offline   Reply With Quote

Old   May 5, 2013, 08:11
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 4,228
Blog Entries: 31
Rep Power: 45
wyldckat has a spectacular aura aboutwyldckat has a spectacular aura about
OK, then for comparison, adapt the solver pimpleFoam as well and compare the results.
Because as I wrote before in the same thread you mentioned, this way it'll make it easier to diagnose which component is making the scalar diffuse too much!
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problems concerning mass conservativity in bubbleFoam with custom scalar transport cutter OpenFOAM 1 March 5, 2013 08:03
Passive scalar transport novyno OpenFOAM Running, Solving & CFD 9 September 6, 2012 06:52
Source Term on Scalar Transport Equation alessio.nz OpenFOAM Programming & Development 9 January 31, 2011 07:56
Scalar transport equation dimension problem litonx OpenFOAM Running, Solving & CFD 3 March 2, 2007 06:49
Scalar Transport Equations David harvey FLUENT 1 January 31, 2004 06:15


All times are GMT -4. The time now is 22:46.