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/)
-   -   How to write a transport model (https://www.cfd-online.com/Forums/openfoam-solving/58435-how-write-transport-model.html)

shawn October 22, 2008 19:59

I have a couple of questions a
 
I have a couple of questions about writing a transport model.

I would like to model mixing with a viscosity which is a function of the volume fraction gamma. I think the best way to go about this would be to create a new transportModel. I looked at the header and c file for the CrossPowerLaw model, but am still a bit confused.

Can I introduce gamma using the syntax

const volScalarField& gamma

in the constructor? I would then need a way to call the local gamma to calculate the viscosity, in a way similar to the strainRate() function?

My end goal is to be able to specify coeficients for a polynomial in gamma n0,n1,n2,... so that

nu = n0+n1*gamma+n2*pow(gamma,2)+....

Can I introduce the set of n's the same way the nu_0 and etc are introduced in the CrossPowerLaw header and C file?



Am I thinking about this correctly? Have I missed some documentation that already covers this?

Shawn


All times are GMT -4. The time now is 11:30.