CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   GradP in channeloodles (http://www.cfd-online.com/Forums/openfoam-solving/59458-gradp-channeloodles.html)

nikos_fb16 September 10, 2007 09:46

Hi all, I want to run chann
 
Hi all,

I want to run channelOodles with an fixed driving pressure gradient gradP, the Ubar can come as an result of the simulation.

1. My first idea was to manipulate the UEqn in channelOodles.C by writing for example:

dimensionedScalar pforce
(
"pforce",
dimensionSet(0, 1, -2, 0, 0),
-0.005
);

fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
+ sgsModel->divB(U)
==
flowDirection*pforce);

and further exclude the correctionsteps for the driving force in the code.

2. In another thread I read that this source term can be added in Su.

My questions:

1. Which one is the better way to add the source term and why so?

2. If the first way is possible, what do I have to keep in mind except that p is divided by rho? ( Is Multiplication by cell-volume and cell-width in flowdirection not necessary ??)

3. How can I realize the second way? Where do I find Su to add the source term?

Im new in OpenFoam and Im very thankful for any help.


All times are GMT -4. The time now is 05:55.