CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Definition of a linear function as volScalarField (

titio March 19, 2009 14:22

Definition of a linear function as volScalarField
Hi Foamers,

I am trying to model non-newtonian flow and in the model I am being using I have a linear function that depends on the trace of stress tensor field, in the form


I am using the PISO algorithm to solve the equations, and I believe to calculate that linear function I need to define a volScalarField, and mapped it in the mesh. I am using the following code to do this

volScalarField func_lin
1.0 + K*tr(stressS)

K is a scalar constant. Am I right? I think this code initializes the scalar field, that is then recalculated in each iteration.

However, when I compare my predictions with analytical results, I do not get good results. I may be due to the definition of the linear function.

Can someone help me out? Thanks,


troosta October 3, 2010 16:51

openfoam solvers combination
I am trying to combine two solvers of openfoam (nonNewtonianIcoFoam anddieselFoam). I need an algorithm to do it.

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