CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   energy equation problem (https://www.cfd-online.com/Forums/openfoam-programming-development/147023-energy-equation-problem.html)

Gary51075607 January 12, 2015 02:12

energy equation problem
 
hello, eveybody
i'm a new in learning OpenFoam and have problems in reading the EEqn.H in the solver of buyoantSimpleFoam.
what do the follwing secentences respect for?

he.name() == "e"
? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho))
: fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))

and i also doubt about the "fvOptions" followed.

fabian_roesler January 12, 2015 03:17

Hi Gary

Quote:

he.name() == "e"
? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho))
: fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))
is an if structure to decide whether to use
internal energy
Code:

fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho))
or enthalpy
Code:

fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))
formulation, where 0.5*magSqr(U) is specific kinetic energy and p/rho should be a work term.

Quote:

+ fvOptions(rho, he)
fvOptions is a kind of library where options like porous media, SRF/MRF and sources for all solvers are implemented. So if you choose to add a source term for a specific cell zone, this will be handled here.

Hope this helps a bit.

Cheers

Fabian

Gary51075607 January 12, 2015 07:55

Thank you very much, Febian. Now i can completely understand it

Regard,

Gary

Gary51075607 January 29, 2015 03:52

Quote:

Originally Posted by fabian_roesler (Post 527062)

fvOptions is a kind of library where options like porous media, SRF/MRF and sources for all solvers are implemented. So if you choose to add a source term for a specific cell zone, this will be handled here.

Hi, Fabian

Now i want to add a source term in the energy equation using the fvOptions. where can i get enough info about it?

Regards!

Gary

fabian_roesler February 20, 2015 04:36

Browse the tutorials and you will find everthing you need:

Code:


energySource1
{
    type            scalarSemiImplicitSource;
    active          true;
    timeStart      0.2;
    duration        2.0;
    selectionMode  points;
    points
    (
        (2.75 0.5 0)
    );
    scalarSemiImplicitSourceCoeffs
    {
        volumeMode      absolute;
        injectionRateSuSp
        {
            h          (10 0);
        }
    }
}

Code:


source1
{
    type            fixedTemperatureConstraint;
    active          true;
    timeStart      0.1;
    duration        0.4;
    selectionMode  cellSet;
    cellSet        ignitionCells;
    fixedTemperatureConstraintCoeffs
    {
        mode            uniform;
        temperature    2000;
    }
}


umeshisode August 7, 2015 07:55

What "ekp" stands for in EEqn.h file in rhoPorousSimpleFoam
 
Hello Everybody,

I am trying to understand a rhoPorousSimpleFoam solver but stuck in the file EEqn.h at solvers directory.

fvScalarMatrix EEqn
(
fvm::div(phi, he)
+ (
he.name() == "e"
? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho))
: fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))
)
- fvm::laplacian(turbulence->alphaEff(), he)
==
fvOptions(rho, he)
);


In above code what is "Ekp" and "K" stands for .

And one more question, how to get value in "fvOptions(rho, he)".

Thanks in advance. Waiting for your reply.


All times are GMT -4. The time now is 17:48.