Boundary Conditions for viscous flow ... Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Boundary Conditions for viscous flow in 2D-Channel « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

andreachan
Member
Username: andreachan

Post Number: 6
Registered: 12-2009
Posted on Friday, March 19, 2010 - 09:43 am:   

The situation is a simple 2D-Channel. Viscous fluid flows in it.

When I set the boundary conditions as below, the calculation in FlexPDE does not work. Exactly the error message is 'Floating point stack check'
BCs:

at the upper & botton walls: value(u)=0 value(v)=0 load(p)=0
at inlet: value(u)=u0 value(v)=0
at outlet: load(u)=0 load(v)=0

where u and v are the velocities in x- and y-directions. p is the pressure. u0 is a velocity-profile.

the main equations are just the same as they are in the example lowvisc.pde

u: visc*div(grad(u)) - dx(p) = dens*(u*dx(u) + v*dy(u))

v: visc*div(grad(v)) - dy(p) = dens*(u*dx(v) + v*dy(v))

p: div(grad(p)) = penalty*(dx(u)+dy(v))

Can anyone tell me the reason, why it doesn't work?

Top of pagePrevious messageNext messageBottom of page Link to this message

mgnelson
Moderator
Username: mgnelson

Post Number: 185
Registered: 07-2007
Posted on Friday, March 19, 2010 - 05:48 pm:   

If you attach your script, we can take a look at it. It is too difficult to guess based on the information listed here. We need to be able to run the script.
Top of pagePrevious messageNext messageBottom of page Link to this message

andreachan
Member
Username: andreachan

Post Number: 7
Registered: 12-2009
Posted on Friday, March 26, 2010 - 12:08 pm:   

application/octet-stream
model_a.pde (1.2 k)

here is the script.
Top of pagePrevious messageNext messageBottom of page Link to this message

rgnelson
Moderator
Username: rgnelson

Post Number: 1338
Registered: 06-2003
Posted on Friday, March 26, 2010 - 03:16 pm:   

1) your boundary conditions on P are all derivatives, which makes the pressure underspecified and free to float to arbitrary values. This is probably where the stack check is coming from. You need to put some kind of value constraint on P. Either a CONSTRAINT equation to force the integral, or (as I have done in the attached) simply set the outlet pressure to zero.

2)
Uniform velocity on the input plane with zero velocity on the sides creates a non-physical condition (you can't implement such a thing in the real world). It requires an infinite pressure spike at the corners and infinite regridding to resolve the spike. You could put a short stub of Load(u)=0 on the corners to allow a smooth transition to zero, or you could input a shape that drops to zero at the walls. Or you can limit the mesh size (as the student version will do) and accept an approximate answer.

3)
Forcing v=0 at the exit seems to be mildly inconsistent with something else in the problem. It seems to work a bit better if you use LOAD(v)=0 on the outlet.

4)
If you input the quadratic channel distribution for u at the inlet, then v is nominally zero everywhere, and FLexPDE will continually readjust the scaling of v trying to find the range of activity. An appropriate THRESHOLD on V will prevent this from becoming an infinite search.

See attached.
application/octet-stream
model_a1.pde (1.7 k)

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration