Time Plots Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Time Plots « Previous Next »

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

Alex Klimenko (scorpion)
New member
Username: scorpion

Post Number: 1
Registered: 03-2007
Posted on Wednesday, March 28, 2007 - 03:51 pm:   

Dear Robert,
please explain is there any possibility in FlexPDE to plot a time-dependent scalar function as a function of time?
For example I have command
report(bintegral(normal(grad(C)),"kathode")) as "Tok "
Can I make a plot Tok(t)?
Can I report somehow a maximum value of Tok? I mean Tok is a function of t but I need to know its maximum value. Thank you.
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 799
Registered: 06-2003
Posted on Wednesday, March 28, 2007 - 05:54 pm:   

1.
A HISTORY plot displays the time history of its argument. You want the following:

PLOTS
HISTORY(bintegral(normal(grad(C)),"kathode"))

Or you can define TOK in the DEFINITIONS section and plot HISTORY(TOK).

2.
To remember a temporal maximum, you'll have to use a GLOBAL VARIABLE (SCALAR VARIABLE in versions before 5):

GLOBAL VARIABLES
TokMax
...
EQUATIONS
...
TokMax = MAX(TokMax,TOK)






Top of pagePrevious messageNext messageBottom of page Link to this message

Alex Klimenko (scorpion)
New member
Username: scorpion

Post Number: 2
Registered: 03-2007
Posted on Wednesday, April 11, 2007 - 02:19 pm:   

Dear Robert,
Ok, item 1 works fine but I have a problem with item 2.
If TokMax were predefined then TokMax = MAX(TokMax,TOK) would be calculated correctly. But TokMax is a function of variable. Please look what I mean:
PotokMax = MAX(PotokMax,bintegral(vx,"left border"))
where vx is a variable. Without this simple equation everything is Ok. But with it I receive error message. If I use istead of vx something stricktly defined like 0,1, Sin(x) or even other variable p (which is prescribed on left border in BC) everything is OK. Is it possible to find a maximum of a function that depends on a variable? Thank you.
Also is it possible to find a local maximum of the same construction? It looks like a beating sinusoid.
application/octet-streamMy program
super1.pde (2.9 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 810
Registered: 06-2003
Posted on Wednesday, April 11, 2007 - 09:16 pm:   

My earlier suggestion (Using a GLOBAL VARIABLE) turns out to be inadequate for a couple of reasons:
1) A Max function is not analytic, so it confuses Newton's method.
2) the bintegral is not updated on every Newton iteration unless you SELECT NRUPFIT. But if you do, the Max reports the max of all Newton trials, not of the final solutions.

Anyway, what you wanted was a temporal maximum, so I have implemented two new functions, TIME_MIN(expr) and TIME_MAX(expr) to do this.

The windows 32-bit version of this development release is in www.pdesolutions.com/download/xfpde5016x4win.exe
This is a self-extracting archive containing only flexpde5.exe. It is not a full install. Extract the file over your old executable, or change the name of the old file first.

This version will be released at some later time, perhaps with more updates, as version 5.0.16.

So now you don't need a GLOBAL variable. Just define TokMax = TIME_MAX(TOK) in the definitions section.

Top of pagePrevious messageNext messageBottom of page Link to this message

Alex Klimenko (scorpion)
Junior Member
Username: scorpion

Post Number: 3
Registered: 03-2007
Posted on Thursday, April 12, 2007 - 05:09 am:   

Dear Robert,
the link doesn't work. May be you've meant
www.pdesolutions.com/download/xfpde1016x4win.exe

Thank you for help very much
Top of pagePrevious messageNext messageBottom of page Link to this message

Alex Klimenko (scorpion)
Member
Username: scorpion

Post Number: 4
Registered: 03-2007
Posted on Thursday, April 12, 2007 - 07:05 am:   

OK, it works, thanks.
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 811
Registered: 06-2003
Posted on Thursday, April 12, 2007 - 01:05 pm:   

I made a typo when I posted it. Sorry.
It is supposed to be "5016x4", the version number.
I have corrected it.

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