CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Solver Suggestions (

coops August 22, 2006 23:45

Hi all, I have been working
Hi all,

I have been working with openFOAM for a little while now but I am still having trouble creating the model I would like. I am able to create the mesh and the initial fields but I am not able to get the model to solve. Essentially I have two fluids; one that occupies the entire domain (a 3D rectangular Prism) whilst the other flows through the domain, with the shape of a tube. There are 3 equations that I would like to include: the continuity equation, a momentum equation and a temperature equation. I would like to solve for density (or pressure), Velocity and Temperature.

The momentum equation has the following terms:

Lagragian Derivative of U - gravity - viscosity (laplacian of U) + iondrag (difference of the two fluid velocities) = pressure gradient.

The temperature equation has the following:

Lagrangian Derivative of T + conductive heating term (Laplacian of T) + work term (T times divergence of U) = time rate of change of kinetic energy (time derivative of kinetic energy equation (.5mv^2)).

Is it possible to model such a problem with openFOAM. If so, which tutorial solver is the closest maatch for this model, ie which solver should I begin with and 'hack' into the solver I require.

If someone is able to help but needs more information on the problem let me know and I can email the details.

Thanks in advance,


eugene August 23, 2006 05:56

That depends on how the 2 flui
That depends on how the 2 fluids are coupled.

coops August 23, 2006 18:48

Thanks for the response Eugene
Thanks for the response Eugene,

There is simply a one-way coupling. The fluid that occupies the entire domain is affected by the fluid that flow in a 'tube'. The fluid that flows in the 'tube' is not effected by anything.

Do you think this sort of problem could be model in openFOAM?

I started working with sonicTurbFoam but the turbulence part of the model is not important to us. Also, with this solver, adjusted a little to suit the equations I need, give solution singularities for pressure, which of course leads to all other fields having either solution singularities or NANs.



eugene August 24, 2006 04:37

Unless your flow is hypersonic
Unless your flow is hypersonic, I would use rhoTurbFoam as a starting point, not a sonic code.

How do you accomplish the coupling at present?

eugene August 24, 2006 04:42

Sorry, I meant to say "transon
Sorry, I meant to say "transonic"

coops August 24, 2006 22:57

Hi Eugene The flows will al
Hi Eugene

The flows will all be subsonic. Also, we are not interested in the turbulence associated with the flows. Does it make the model more stable to include the k-epsilon turbulence model? At the moment the coupling between the two fluids in the momentum equation is achieved from a term that consists of the difference between the to velocity fields (multiplied by a collisional frequency co-efficient). In the energy equation the coupling is of the same form expect the velocity difference is squared here.

Thanks for your interest and assistance,


coops August 27, 2006 21:11

I meant to say that the energy
I meant to say that the energy equation is coupled in the same way as the momentum equation EXCEPT the velocity difference is squared.


All times are GMT -4. The time now is 06:48.