VALUE(..) = NORMAL(..) BC doesn't wor... Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » VALUE(..) = NORMAL(..) BC doesn't work? « Previous Next »

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

David Benin (dben)
New member
Username: dben

Post Number: 1
Registered: 09-2007
Posted on Monday, September 24, 2007 - 06:02 pm:   

I'm unable to implement a boundary condition of the form

value(F) = normal( V) ,

where F(x,y) is the dependent variable for a pde in 2D and V(x,y) is some previously defined vector field. I'm using FlexPDE 2.22c and Windows XP Pro, and invariably get execution failure with a memory protection fault with this form of boundary condition. A sample problem descriptor is attached.

It's odd, because if one defines a vector field n(x,y) such that, on the boundary, n is the outward unit normal, then this same boundary condition rewritten as

value(F) = dot(n,V)

executes properly. Is it that the right-hand side of a value() = ... boundary condition must be a bona-fide function in the domain of the problem, which dot(n,v) is here but normal(V) isn't?

Also odd is that this problem isn't there with the natural boundary condition; natural(F) = normal(V) works fine. What am I missing? I know ver. 2.22c is outdated. Is that the problem?

My interest is a system of coupled equations where one of the boundary conditions is: value of one variable is proportional to the normal derivative of another. The geometry can get complicated, so it would certainly be useful to have FlexPDE's normal(...) figure out the normal component.

application/octet-streambad value BC?
Bad Value BC.pde (1.7 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 960
Registered: 06-2003
Posted on Tuesday, September 25, 2007 - 02:08 pm:   

In order to compute the normal, the expression evaluator needs to know what side of the evaluation cell to be normal to.

The Natural BC, which is applied on sides, provides this information to the evaluator.

The Value BC, which is applied at nodes, does not set up this information for the evaluator, and so it crashes. There is no reason why it could not be done, it simply didn't occur to us.

Version 5 tests for the unspecified side condition, and reports "Normal must be computed on a boundary". This is not much better than crashing....

We will try to remedy this in a future release, but for now you will need to use the explicit normal expression.


Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 961
Registered: 06-2003
Posted on Tuesday, September 25, 2007 - 02:22 pm:   

There is a way to simulate a Value condition with a Natural condition:

If you want Value(F)=K, you can apply a penalty flux to drive F to K. In your equation, the Natural defines the Incoming flux (that is, it defines the outward normal component of grad(F)).
Natural(F) = Large*(K-F) will generate a restoring flux to drive F to K.

"Large" will determine how tightly F is locked to K. Too large, and it will dominate the numerics to bad effect. Too small, and F will deviate substantially. Cut and try.

See attached.
application/octet-stream
Bad_Value_BC.pde (1.7 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

David Benin (dben)
New member
Username: dben

Post Number: 2
Registered: 09-2007
Posted on Tuesday, September 25, 2007 - 03:47 pm:   

Mr. Nelson, thanks very much for your comments, helpful as always. Actually, I have encountered your "penalty flux" idea before in some of the example scripts, and have used it myself - I think of it like a "velocity slip" boundary condition in fluid flow. It just didn't occur to me to use it here. It should allow me to do just what I want. Many thanks.

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