zeroing the variable Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » zeroing the variable « Previous Next »

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

Penia Kresnowati (penia_kdh)
New member
Username: penia_kdh

Post Number: 1
Registered: 05-2009
Posted on Thursday, May 21, 2009 - 10:37 pm:   

Hi all...
I am a new user of flexPDE. Now I am using it to model diffusion and convection of a subtance inside a reactor.
Is there any way to stop the simulation when the value of the variable reach zero? Negative concentration is not realistic and it the negative value may lead to strange/unrealistic overall result.
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 1258
Registered: 06-2003
Posted on Thursday, May 21, 2009 - 10:59 pm:   

1.
FlexPDE (and the finite element method in general) uses polynomial patches to approximate the solution. In cases of sharp fronts, if the mesh is not sufficiently dense, the interpolation can produce ringing and over/undershoots. This is not in itself a disaster, as energy is still conserved, and when the front smooths out the energy content will still be correct and the over/undershoots will disappear.

2.
If your solution has become negative over a significant area of the domain, then you should consider the possibility that you have written your equations wrong.

3.
You can use the HALT clause to stop the simulation when any logical condition is met. See HALT in the Help Index.
Top of pagePrevious messageNext messageBottom of page Link to this message

Penia Kresnowati (penia_kdh)
New member
Username: penia_kdh

Post Number: 2
Registered: 05-2009
Posted on Tuesday, June 02, 2009 - 01:09 am:   

Thanks for the reply Robert.
I could not use halt in my simulation as it is not a time dependent simulation.
I rewrite the boundary to make reaction rate zero for the value of dependent variable equal to zero or less. But it doesnot always work well if I change the value of one parameter (for example vx in the attached file) and it give out a strange result.
Do you have any other suggestion?
application/octet-streamdiffusion, convection and reaction
Kresnowati.pde (1.7 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 1261
Registered: 06-2003
Posted on Tuesday, June 02, 2009 - 02:19 pm:   

For reasons I don't yet understand, the "Mesh_Density" command you have used is confusing the Student version of FlexPDE 5.

Take this command out, and everything seems to work correctly.

Top of pagePrevious messageNext messageBottom of page Link to this message

Penia Kresnowati (penia_kdh)
Junior Member
Username: penia_kdh

Post Number: 3
Registered: 05-2009
Posted on Wednesday, June 03, 2009 - 08:59 pm:   

It works better now...
Thanks Robert

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