CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Solving stationary two-phase Laplace-equation (https://www.cfd-online.com/Forums/openfoam/65104-solving-stationary-two-phase-laplace-equation.html)

 Martin123 June 3, 2009 18:39

Solving stationary two-phase Laplace-equation

Sorry first for my beginner question, I am quite new to CFD. I would like to solve the Laplace equation for inhomogeneous media:

For starting, I tried to solve the first term only and managed to setup the k-field (volscalarfield) on run-time. However, I don't see any influence of varying k when using fvm:: discretization - I solved

fvm::laplacian(k, U)

Am I on the right way or should I rethink completely my approach? I am very unsure how OF deals with the extra volScalarField from K: I want to solve certainly for U but I wonder what OF would see with my equation above? Should I better use somehow dictionary values for k and grad k?

 Martin123 June 5, 2009 11:51

OMG I am really lost. What I tried:

...

solve
(
);

But still, I don't get correct results. Is my assumption right, that I may not use a second geometric field here inside since it is considered as an additional degree of freedom? Did I understand correctly that: if I use fvc:: this is added as a source term whereas all fvm:: operations cause the DOF (e.g. U) to be considered?

Is it alternatively possible to construct a dictionary from a volScalarField? Or taking dictionary values from a run-time function?