How to use parameters from prior stag... Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » How to use parameters from prior stage in staged scripts « Previous Next »

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

Steve Macica (steve_macica)
Member
Username: steve_macica

Post Number: 4
Registered: 05-2009
Posted on Thursday, June 04, 2009 - 12:19 pm:   

I'd like to run, lets say, a four stage script that requires some data from a previous stage. How do I accomplish this? I modified stages.pde(a sample provided by Flexpde) as an attempt to accomplish this. I'm using TABLE to export a simple data value (I could have used transfer but the files are large and all that data was not required). In doing so, there are four files generated by this script, one export file per stage pass(appending the stage sequence to the file name). I'm trying to use TABLEDEF to import the data from a previous stage but I'm finding that I can't change the file sequence number as a function of the present stage. For the sake of simplicity, please don't attempt to explain how on the first stage or pass there is no previous data, I have a more complicated script that handles this case.
As a side question, is there a way to run a script and pass an include file or other parameters from the command line? This would be a very powerful feature with the aid of a Perl/Bash script.
One other thing, when using TABLE to export data, if I set points=1 the .tbl file has zero data in it(see the commented instruction in the enclosed file). The work around was to set points=2(you get two points with the same data). Is there a boundary condition(from a programming point of view, not mathematical) error with this function?
application/zipSample staged script.
StagesTest.zip (1.3 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Steve Macica (steve_macica)
Member
Username: steve_macica

Post Number: 5
Registered: 05-2009
Posted on Thursday, June 04, 2009 - 12:24 pm:   

I wish it was possible for authors to edit their messages on this billboard! The topic should read
"HOW to use parameters from prior stage."

Top of pagePrevious messageNext messageBottom of page Link to this message

Marek Nelson (mgnelson)
Moderator
Username: mgnelson

Post Number: 122
Registered: 07-2007
Posted on Friday, June 05, 2009 - 03:46 pm:   

1)
If these previous values that you wish to use are known prior to the run (as it appears they are in this case), I would suggest using two staged parameters that are offset:
SELECT stages = 4
scale = STAGED(1,2,4,8)
prev_scale = STAGED(1,1,2,4,8)

If these values are not known prior to the run, then things get more complicated.


2)
No, there is no way to pass an additional include file on the command line. A possibility is to always use the same include file name in your script, but use your bash shell to rename the files you want to use before calling FlexPDE - i.e. you have several include files that you rename on the fly.

3)
A one point TABLE would be unreadable, since FlexPDE will try to interpolate between the table points. This is likely why FlexPDE will only output two or more table points.

4)
A side issue - As I was looking at your script, I noticed that FlexPDE did not truncate your longer STAGED list, as it should. You have two staged parameters - one with three values the other with four values - so FlexPDE should only run three stages. It actually runs four, with an improper value for the parameter with a shorter list. I will log this as a bug to be fixed in a future release.

Top of pagePrevious messageNext messageBottom of page Link to this message

penpark sirimark (penpark)
New member
Username: penpark

Post Number: 1
Registered: 06-2009
Posted on Wednesday, June 10, 2009 - 10:52 pm:   

hi
i have some problem to ask u
How I use Flexpde for this equation ?

Euler equation for incompressible flow
(u*dx(u) + v*dy(u)) = -dx(p)
(u*dx(v) + v*dy(v)) = -dy(p)

Continuous equation
(dx(u)+dy(v))=0


can u help me ? send code in flexpde for me

thank you
nyny

application/msword
Euler equation for incompressible flow.doc (20.0 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Marek Nelson (mgnelson)
Moderator
Username: mgnelson

Post Number: 123
Registered: 07-2007
Posted on Thursday, June 11, 2009 - 09:26 pm:   

We have several example problems that address these systems. See examples in the following directory paths:

V5: Samples | Steady-State | Fluids
V6: Samples | Applications | Fluids

In particular look at the comments in the "Viscous.pde" example.

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