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 add this term to openfoam solver (https://www.cfd-online.com/Forums/openfoam-programming-development/149093-how-add-term-openfoam-solver.html)

rapierrz February 25, 2015 13:59

How can i add this term to icoFoam
 
Hello friends,

how can i add the right hand side equation to icoFoam???:confused:

http://www.uploadmb.com/dw.php?id=1424891238

http://i57.tinypic.com/12675ur.jpg

kmooney February 26, 2015 19:05

If this is the NS diffusion term its already there.

rapierrz February 27, 2015 01:16

yes.This is diffusion term but usually in solvers there is only

div(grad(U)) and i want to know how to write

div(grad(U)+grad(U).tanspose)

I write div(nu,symm(fvc::grad(U))) and Error was :

no matching function for call to ‘div(Foam::volScalarField&...

ssss February 27, 2015 03:52

I suppose you are using non constant viscosity so:

Code:


fvc::grad(mu)&fvc::grad(U)+fvc::laplacian(mu,U)

You should change fvc for fvm if you want to use a more implicit calculation in the momentumPredictor.

I recommend yo to take a look at the solver: nonNewtonianIcoFoam

rapierrz February 27, 2015 05:20

thank you ssss,

my problem is that how i can define div(mu,grad(U).transpose)

ssss February 27, 2015 05:23

Code:

fvc::grad(U).T()

rapierrz February 27, 2015 05:35

When i use of fvc::grad(U).T() error is :

has no member named ‘T’

ssss February 27, 2015 05:37

Then try:

Code:

T(fvc::grad(U))

rapierrz February 27, 2015 05:47

it does not work :(

my openfoam version is 2.2.1

ssss February 27, 2015 08:13

Well then last chance:

Code:

fvc::grad(U)().T()
It compiles for me

rapierrz February 28, 2015 12:30

Thank you very much ssss:D

ut's working correctly.

you was great help for me.


All times are GMT -4. The time now is 18:53.