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/)
-   -   volScalarField-->surfaceScalarField (https://www.cfd-online.com/Forums/openfoam-programming-development/150109-volscalarfield-surfacescalarfield.html)

kebsiali March 16, 2015 02:39

volScalarField-->surfaceScalarField
 
Dear Foamers,

Excuse my naive question, but i have been suffering for a week now trying to do something (considered) trivial.
i have a volScalarField that i need to multiply by a surfaceScalarField
so i thought all i need is to use the interpolate function as
AB=fvc::interpolate(A)*B;
A, B, and AB are already defined in creatField.H
where A is the volScalarField, where B and AB are surfaceScalarField.
my A is initially equal to 1 but then it diminishes to 0 at some points.
but the code returns the value of B as if fvc::interpolate(A) is equal to 1 everywhere at everytime step.
I think (quite sure) that the problem is with using the function fvc::interpolate(), and not with other parts of the code.

Thank you all in advance,

kebsiali March 18, 2015 11:25

Why no one is trying to answer??? (wrong grammar i know)
Well, in case you wonder, i found the problem.

The function interpolate is overloaded in its class
where if it is called with a certain type it would return one always but if called with geometricFields it would do the interpolation in the normal way.

I wish someone might find this helpfull.

thanks for passing by.


All times are GMT -4. The time now is 10:04.