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/)
-   -   Cyclic inletoutlet with icoFoam (http://www.cfd-online.com/Forums/openfoam-solving/58369-cyclic-inletoutlet-icofoam.html)

sripplinger October 30, 2008 13:27

I'm curious if you can have a
 
I'm curious if you can have a cyclic inlet and outlet with the icoFoam solver. I mean, I know you can set the inlet and outlet boundaries as cyclic, but how do you get the fluid to move? Can you set a mass flow rate or pressure gradient? If so, how? I've looked at the channelOodles tutorial case, but haven't figure this out yet.

steven October 30, 2008 15:41

You can set up a mean velocity
 
You can set up a mean velocity, ubar, instead of mass flow rate or pressure gradient.

Steve

johndeas October 31, 2008 10:43

You'll have to use a modified
 
You'll have to use a modified version of icoFoam though. See the channeloodles solver as a source of inspiration.

sripplinger October 31, 2008 11:25

Sounds like more work than it'
 
Sounds like more work than it's worth to me right now. I'll likely just deal with a entrance region and take my data farther downstream. Thanks.

mattijs November 5, 2008 04:04

You could try the directMapped
 
You could try the directMapped boundary condition which recycles sampled data (from inside the domain) to the inlet. See the oodles/pitzDailyDirectMapped case.

antonio_ing November 8, 2008 05:48

hi guys I've tried this in
 
hi guys

I've tried this in a simulation of a channel flow just adding a constant pressure gradient to the icoFoam solver, so modifing the equations. In this way it is possible to work with a dummy pressure that can be cyclic (0 in steady state).
You can take the icoFoam solver folder in /OpenFOAM/applications/solvers/incompressible/icoFoam
copy it and rename as you wish (i used flatChannel). then rename the icoFoam.c as flatChannel.C and add the pressure gradient term as:

fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu,U)
+ dpdx
);

in the createField.H you have to add a term that recall a file inside the directory 0 named dpdx. The expression is the same of the call at the p file so you can just modify it.
Then in the 0 directory you have to create a file dpdx similar to the pressure file (remember that the dimensions are different i.e. [0 1 -2 0 0 0]) and set everywhere it constant

also, you have to change the call to the function icoFoam in the directory of the new solvers (follow the pogrammers guide for a better explanation)

i know that is a mess but it worked fine for me in a channel flow. Any suggestions for easier ways are welcome

bye


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