CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Momentum equation of Darcy's law (http://www.cfd-online.com/Forums/openfoam-solving/63718-momentum-equation-darcys-law.html)

 sambatra April 17, 2009 02:25

Momentum equation of Darcy's law

Hi there,
I'm dealing with combustion modeling which takes into account Darcy's law for the momentum equation.I'm trying to solve thi momentum equation and it seems like I got trouble:
the velocity equation is:
U = -K*fvc:grad(p); where K is constant to be calculated
the pressure equation is:
to implement this into the code I tried this following syntax:
-fvm:laplacian(-K1,pow(p,2)) == S where S is the source term to be calculated also
and I came out with an error message like GeometricField:double....or something
Can somebody out there help me out and tell me what I have to do to implement this pressure equation into the code?
Regards,

 olesen April 17, 2009 02:49

You might wish to examine the rhoPorousSimpleFoam solver to gather some ideas.

 sambatra April 17, 2009 03:27

I have just taken a look at the rhoPorousSimpleFoam solver,
but you know, I am new to Openfoam and there are some syntax in the code I dont know and I cant find in the programmers guide such as 'tmp<>', so I'm struggling a bit.
My question is:
is it possible to have this fvm:laplacian(k,pow(p,2)) in the lapalcian scheme?
or do I have to cast 'p' in the coefficient 'k' and I get this
fvm:laplacian(k1,p)?
Regards,

 All times are GMT -4. The time now is 15:22.