CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Volumic source term (https://www.cfd-online.com/Forums/openfoam-solving/79317-volumic-source-term.html)

Aurelien Thinat August 19, 2010 12:11

Volumic source term
 
Hello everybody,

I didn't find any topic on this subject so here I am. I would like to create a volume source term in a fluid region.

I have a fluid domain, and I need that a part of this fluid generates a scalar source term, which could be temperature or inert species.

Is there any function in OpenFoam for this purpose ? I would use reactingFoam after disabling the chemistry.

Thank you all.

Aurélien

alfa_8C November 29, 2010 08:24

volume sources and sink in openFoam
 
Hello Aurélien,

A good day to you!
I am about to face exactly the same problem. I also want to use reactingFoam without chemistry reactions, and apply volume sources and volume sinks. Did you find out how to it?

Thank you in advance,
Tony

santiagomarquezd November 29, 2010 09:51

Aurelien and Tony, sources are discretized by Sp(), Su(), SuSp() operators and in direct manner (fvm::div(phi,T)==b).

Regards.

alfa_8C November 29, 2010 10:41

Dear Santiago,

thanks a lot for the input! Could you post a code example of a defined source/sink respectively? I need to implement a volume source. If you've ever done something like this, I would appreciate any advice...

Best Regards, Tony

santiagomarquezd November 30, 2010 12:21

Hi, looking at epsilon equation definition from standard k-epsilon model you have an example:

Code:

00223    // Dissipation equation
00224    tmp<fvScalarMatrix> epsEqn
00225    (
00226        fvm::ddt(epsilon_)
00227      + fvm::div(phi_, epsilon_)
00228      - fvm::Sp(fvc::div(phi_), epsilon_)
00229      - fvm::laplacian(DepsilonEff(), epsilon_)
00230      ==
00231        C1_*G*epsilon_/k_
00232      - fvm::Sp(C2_*epsilon_/k_, epsilon_)
00233    );

this is the implementation of second equation in http://www.cfd-online.com/Wiki/Standard_k-epsilon_model, check the term with C2 where a quadratic source is defined.

Regards.


All times are GMT -4. The time now is 20:44.