Problem when transfering data to anot... Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Problem when transfering data to another application « Previous Next »

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

Jianlei Yu (physhark)
New member
Username: physhark

Post Number: 1
Registered: 10-2007
Posted on Wednesday, October 24, 2007 - 10:49 am:   

Hi, I'm a new user.
I'm trying to solve three coupled nonlinear equations . There are two steps: 1. Use "initial.pde" to calculate initial values for three variables and export data to "initial.data"; 2. Provide initial values for variables by importing data from "initial.data" and solve these equations.
It seems that my scripts is right, but the results is obviously wrong. I think there is something wrong when I trasfer data from initial.pde to experiment.pde for the reason that jp0(which is 0 in initial.pde) is not equal to 0 in experiment.pde.
How could I solve this problem?
PS: The scripts are in the attachments.
application/octet-streaminitial.pde
initial.pde (2.3 k)
application/octet-streamexperiment.pde
experiment.pde (3.0 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 973
Registered: 06-2003
Posted on Wednesday, October 24, 2007 - 01:45 pm:   

Your script #includes a file definition.txt which you did not post. Please send us this file.
Top of pagePrevious messageNext messageBottom of page Link to this message

Jianlei Yu (physhark)
New member
Username: physhark

Post Number: 2
Registered: 10-2007
Posted on Wednesday, October 24, 2007 - 10:11 pm:   

text/plaindefinition
definition.txt (0.3 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 977
Registered: 06-2003
Posted on Thursday, October 25, 2007 - 02:49 pm:   

What you are seeing is the difference between computing an exponential and interpolating an exponential, multiplied by 1e8.

Your jp equation in initial.pde is identically zero, since FlexPDE will expand the derivative of the exponential and cancel the terms.

In experiment.pde, however, you are reading in tabulated values of np0 (nominally n0*exp(-k2*u0)) and interpolating with piecewise quadratics over the cells of the transfer mesh.
Since the exponential function cannot be matched exactly by quadratic pieces, there are small deviations between the interpolation and the analytic value. You then differentiate this mismatch and multiply by 1e8.

The result is the loopy function you observe in the output of experiment.pde.

You should probably restrict the transfer to the value of U and recompute the exponentials.

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