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/)
-   -   How to write source term into scalar Fiel (https://www.cfd-online.com/Forums/openfoam-programming-development/86454-how-write-source-term-into-scalar-fiel.html)

JimKnopf March 23, 2011 05:59

How to write source term into scalar Fiel
 
Hello everybody!

I have a equation with a source Term specified by:

fvScalarMatrix xEqn
(
...
+ fvm::SuSp(-fvc::div(phi), x)
);

where x is my specie. Now I like to now visualize just this term. Therefore I created a volScalarField xSource. Now I don't get the result of the source term into the scalar field.

My first Idea was to use

xSource = xEqn.source()

The source() function is of type Field<type>

on compilation i get the error that there is 'no match for operator=' and wmake purposes something like to use a GeometryField.

Well the point is I like to know what is in the source term and i don't get it written out. How do I achieve this ?

Thanks and best regards
Jim


All times are GMT -4. The time now is 00:32.