CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   2 questions about boundary conditions (http://www.cfd-online.com/Forums/openfoam/88496-2-questions-about-boundary-conditions.html)

mateusps May 18, 2011 16:34

2 questions about boundary conditions
 
Hi. I'm starting to use OpenFOAM, and I'm not very used to it yet, so I believe my doubts are really simple. I've had some difficulties about setting some boundary conditions:

(1) Is there a way of setting a BC for p in an inlet to be extrapolated from the internal field, for the use of a solver for incompressible flows, like icoFoam?

(2) Is there a way of setting a given expression as a BC (a given velocity profile, for example)?

nimasam May 18, 2011 17:26

hi
1) extrapolated from the internal field?? for what?
2) groovyBC
http://openfoamwiki.net/index.php/Contrib_groovyBC

mateusps May 19, 2011 08:17

thanks
 
groovyBC, I'll check it.

I want to set BCs to be extrapolated from the internal field in cases where there's no physical consistency in setting other BCs. Then p should be extrapolated from the last volumes near the boundary...

gschaider May 19, 2011 12:24

Quote:

Originally Posted by mateusps (Post 308356)
I want to set BCs to be extrapolated from the internal field in cases where there's no physical consistency in setting other BCs. Then p should be extrapolated from the last volumes near the boundary...

That sounds like zeroGradient to me

mateusps May 19, 2011 12:31

what I want is similar to zeroGradient, but zeroGradient uses only one point to extrapolate (equals the value on the face to that on the last volume center), and I want some BC that uses more points to extrapolate (it could use the last two volume centers to extrapolate to the face using a linear straight, or the last three volume centers to extrapolate to the face using a quadratic function...).


Another doubt: is it possible to use groovyBC (or something similar) to create the inicial internalField???????

Bernhard May 20, 2011 01:51

If there is no physical consistency, then what is the reasoning in doing it like this? Can you comment on the physics you're trying to simulate?


For the initial field you can use funkySetFields.

mateusps May 20, 2011 11:14

thanks for the tip for the initial field. I'll take a look.

the reason for setting a BC to be extrapolated is that it's a better choice for when there's no physically consistent choice of BC applicable. Sometimes the physics of the problem just specifies one BC, but the algorithms of solution require that you specify the BC at all boundaries, so the extrapolation from the internal field is a better choice than others.

Right now I don't wanna simulate anything specifically, but in general such a BC would be useful. For instance, in the simple incompressible laminar flow in a tube, mathmatically it would be necessary just the specification of one BC for p in the axial direction (the inlet OR outlet, usually), but in openFOAM you must specify the inlet AND the outlet. What's usually done is specifying a fixedValue at the outlet and a zeroGradient at the inlet, but that's physically untrue (the gradient is NOT ZERO in the real problem), what causes a bigger entrance length than it would be required. This is a typical case where setting the BC to be extrapolated from the internal field would do a better simulation.

A case in which this is really significant is the simulation of viscoelastic fluids flow, for example. It's necessary to specify BCs for the tension tensor at all boundaries, and, without a better solution, it's usually used zeroGradient, but in this case that's a really bad approach, cause the tension gradient is indeed big and far from zero at the walls. That's a case in which the tension at the walls could be extrapolated from the internal field like a better approximation than the zeroGradient.

Do you understand the problem?

samegypt February 2, 2013 11:19

OpenFoam BC hoe to define an extrapolation BC
 
Hi All
I like to ask how I can define an extrapolation BC at my channel outlet using
OpenFoam BC.
regards,
Samir

zhulianhua August 6, 2014 02:29

Hi, mateusps

Have you find answer for you problem 1?

Best,

Lianhua


All times are GMT -4. The time now is 23:17.