Invalid Floating point error Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Invalid Floating point error « Previous Next »

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

Jay Bala (jay)
New member
Username: jay

Post Number: 1
Registered: 02-2008
Posted on Sunday, February 03, 2008 - 01:40 am:   

Hi,
I am trying to solve two peds to calculate the Xe concentration and reactivity from it. but encountring "Invalid floating point error"
Could you please help me. Thank you.
application/octet-streamReactivity calculation
xe.pde (0.9 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Marek Nelson (mgnelson)
Moderator
Username: mgnelson

Post Number: 19
Registered: 07-2007
Posted on Sunday, February 03, 2008 - 02:35 pm:   

1)
You are getting this error because you have defined your coordinates as Cartesian2 but have only defined a line as your region. In 2D, you need to define some area as your region. Or define your coordinates as Cartesian1.

2)
Your equations have no spatial dependence. So a HISTORY is the only plot that will give any information, and you don't need many cells, so SELECT NGRID=1 will limit the number of cells.

3)
The entire reaction is over by time 1. So you should change your time interval accordingly.

See the attached script.
application/octet-stream
xe1.pde (1.1 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Jay Bala (jay)
New member
Username: jay

Post Number: 2
Registered: 02-2008
Posted on Monday, February 04, 2008 - 01:21 am:   

Thank you.
I actually used cartesian1 (1D
I entered the wrong lambda values, it should be
lambda_i = 0.1035
lambda_Xe = 0.0753
That fixed the timing problem, and gave expected answers. I used the time interval of 1-100 hr.
Thank you for the help. I really appreciate it.
Top of pagePrevious messageNext messageBottom of page Link to this message

Jay Bala (jay)
Junior Member
Username: jay

Post Number: 3
Registered: 02-2008
Posted on Monday, February 04, 2008 - 06:11 pm:   

Hi,
Is there anyway i can find out the exact time when the concentration peaks and exact value of it.
I tried Time_Max but i don't think i am getting it right.
Thank you
Top of pagePrevious messageNext messageBottom of page Link to this message

Marek Nelson (mgnelson)
Moderator
Username: mgnelson

Post Number: 20
Registered: 07-2007
Posted on Monday, February 04, 2008 - 07:09 pm:   

TIME_MAX() is a function that takes a scalar (single numeric value) argument and returns the maximum value seen during the run. So you cannot take the TIME_MAX of a variable directly. In order to get the time max of a variable, you also need to use the GLOBALMAX() or VAL().

i.e.
You can modify your history plot :
HISTORY (Xe) at (1/2,1/2) REPORT (TIME_MAX(GLOBALMAX(Xe)))
This will printout the value at the bottom of the history.

At present, there is no way to get the time at which this maximum was reached. You will have to read it from the history plot. That was an oversight on our part and we intend to add it soon (the TIME_MAX function itself was added in v5.0.16).

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