plot problem Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » plot problem « Previous Next »

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

pepper
New member
Username: pepper

Post Number: 1
Registered: 09-2010
Posted on Monday, September 27, 2010 - 05:59 am:   

holle
Can I plot the contour of "vector ((K*(-dx(h))),(K*(-dy(h))))" ??
Thank you
Top of pagePrevious messageNext messageBottom of page Link to this message

rgnelson
Moderator
Username: rgnelson

Post Number: 1411
Registered: 06-2003
Posted on Monday, September 27, 2010 - 01:17 pm:   

You can't plot a contour of a vector. A contour displays the levels of a scalar quantity. A vector is a directed line segment.

You could plot a contour of the magnitude of a vector,
or you could plot a contour of a component of a vector,
or you could plot two contours of the components of a vector,
or you could plot an arrow plot of the vectors.

The last of these is simply:
VECTOR(-k*dx(h), -k*dy(h)) or
VECTOR(-k*grad(h))

The others are
CONTOUR(magnitude(k*grad(h)))
CONTOUR(-k*dx(h))
CONTOUR(-k*dy(h))
CONTOUR(-k*dx(h)),-k*dy(h))
etc.
Top of pagePrevious messageNext messageBottom of page Link to this message

pepper
New member
Username: pepper

Post Number: 2
Registered: 09-2010
Posted on Monday, September 27, 2010 - 10:56 pm:   

hello
Can I plot the streamline of "div(k*grad(h))=0"
or "dx(k*dx(h))+dy(k*dy(h))=0"
Thank you
Top of pagePrevious messageNext messageBottom of page Link to this message

rgnelson
Moderator
Username: rgnelson

Post Number: 1412
Registered: 06-2003
Posted on Wednesday, September 29, 2010 - 02:53 pm:   

There is no built-in "Streamline" facility, but you can get the plot you want using an adjoint equation. See "fieldmap.pde" in the "Samples|Applications|Electricity" folder in version 6, or the "Samples|Steady_State|Electricity" folder in version 5.
Top of pagePrevious messageNext messageBottom of page Link to this message

pepper
Junior Member
Username: pepper

Post Number: 3
Registered: 09-2010
Posted on Tuesday, October 05, 2010 - 01:25 am:   

May I know what is meaning(use) of
"tangential(grad(v))" in field.pde.
I don't seem to be able to find it in the manual.
I have the folloeing equestions, this see the doc.file
application/octet-streamfield lines
field limes different.docx (90.3 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

rgnelson
Moderator
Username: rgnelson

Post Number: 1413
Registered: 06-2003
Posted on Wednesday, October 06, 2010 - 02:05 pm:   

1) In our example Fieldmap.pde, we plot field lines by use of an adjoint equation. The contours of the adjoint solution are everywhere perpendicular to the contours of the solution. The Natural() bc specifies the normal component of the gradient. So the normal component of the adjoint gradient is (parallel to) the tangential component of the solution gradient.

2) The difference in the plots is simply in the choice of contour levels. Apparently the two-field contour plotter is selecting a range that includes zero, whereas the single field plot merely brackets the actual values. We will look into this.
Top of pagePrevious messageNext messageBottom of page Link to this message

4maitland
Member
Username: 4maitland

Post Number: 10
Registered: 05-2010
Posted on Thursday, October 07, 2010 - 12:14 am:   

Adjoint Equation? are you referring to the conjugate-gradient method?
Top of pagePrevious messageNext messageBottom of page Link to this message

mgnelson
Moderator
Username: mgnelson

Post Number: 209
Registered: 07-2007
Posted on Friday, October 08, 2010 - 04:40 pm:   

The conjugate gradient method is an algorithm for solving a system of equations. The adjoint equation is a pde posed by the user in a script. You can find some basic information about these on Wikipedia.
Top of pagePrevious messageNext messageBottom of page Link to this message

pepper
Member
Username: pepper

Post Number: 5
Registered: 09-2010
Posted on Thursday, October 07, 2010 - 04:40 am:   

When I use "natural(q)=tangential(grad(v))" in
my boundary condition, can I add timestep in my case??
I add timestep in my case is error....
just like doc.file

application/vnd.openxmlformats-officedocument.wordprocessingml.documentcase
my case.docx (188.9 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

mgnelson
Moderator
Username: mgnelson

Post Number: 210
Registered: 07-2007
Posted on Friday, October 08, 2010 - 04:49 pm:   

Your attachment has a graphic of the script text, so we cannot run it. Please attach the script file (*.pde) if you want us to look at it.

I notice that you have added a TIME section to your script, but the problem is not time dependent. The set of equations are steady-state. In this scenario, I would expect FlexPDE to solve the steady-state problem over and over (unnecessarily) at each time step until reaching the end time you requested. I don't know why it would halt due to the time step falling below 1e-9 of the starting time step (this is the error report shown in your doc.) But again, we cannot try the script because it is a graphic, not text.
Top of pagePrevious messageNext messageBottom of page Link to this message

pepper
Member
Username: pepper

Post Number: 6
Registered: 09-2010
Posted on Saturday, October 09, 2010 - 01:15 am:   

this is my script file.
In my case, the contour(q) is representative stream line ??
application/octet-stream
case1 model.pde (1.3 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

mgnelson
Moderator
Username: mgnelson

Post Number: 212
Registered: 07-2007
Posted on Tuesday, October 12, 2010 - 04:48 pm:   

I cannot identify any reason why FlexPDE has cut the time step so drastically. As I said, I would expect FlexPDE to solve the steady state system at every time step.

However, that does not change the fact that you do not have a time dependent problem. There is no reason to ask FlexPDE to solve this sytem in a time dependent fashion. Just remove the TIME section (and the time requests for plots) and the script runs and gives an answer very quickly. See attached.

application/octet-stream
case1_model1.pde (1.4 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