Type Mismatch error Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Type Mismatch error « Previous Next »

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

Dave Gregory (dave)
Junior Member
Username: dave

Post Number: 3
Registered: 02-2008
Posted on Wednesday, March 12, 2008 - 07:24 pm:   

Hi,

I am trying to solve Richards equation,when i run the code it gives type mismatch error.I didn't understand what this error means and how can i correct this error.
application/octet-stream
van_new.pde (1.2 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 1082
Registered: 06-2003
Posted on Thursday, March 13, 2008 - 01:03 am:   

1.
I don't get a type mismatch when I run your script. I get an invalid floating point operation, because you are trying to take a negative number to the power 2.0526.
Fractional powers are implemented as exp(ln(arg)*power), and negative arguments are illegal.

Your C function is ill-behaved. You might want to construct a separate script to compute an plot the values of C.

2.
You also have a 1D equation applied on a 2D domain. This allows oscillation in the unused dimension. You should pose it as a 1D domain, or include a diffusion term in the unused dimension to damp oscillations.


In the attached script, I have converted to a 1D domain and clamped the argument of ()^q.

application/octet-stream
van_new1.pde (1.2 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