Plot Vector in 3D Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Plot Vector in 3D « Previous Next »

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

Augusto (cdfx)
New member
Username: cdfx

Post Number: 1
Registered: 04-2007
Posted on Wednesday, April 11, 2007 - 09:28 am:   

Hello for all! I want plot a vector field in 3D like this :

plots
vector(-dy(u), dx(u), d(z)) points = 70 export format "(#x,#y,#z)=(#1,#2,#3)" file "VECTORFIELD.TXT" as "Vector Fields" norm

Is possible to make something similar?
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 808
Registered: 06-2003
Posted on Wednesday, April 11, 2007 - 01:22 pm:   

Did you try it?
Did it work?
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 809
Registered: 06-2003
Posted on Wednesday, April 11, 2007 - 01:37 pm:   

A vector plot is always in a 2D plane (as are contours as well). It therefore requires two arguments.
You should decide what plane you want to plot in, and what the components of the vectors displayed in that plane should be.

If you want an isometric display, with all the vectors in their proper 3D position, it would either create an unintelligible mass, or require a stereo display. Neither of these is currently supported. You should export the data in one of our standard forms and use an external visualization system such as VisIt to create the graphics.

If you merely want to export the three values over the entire mesh, you should use a TABLE with format string as you have shown.
At present, there are no facilities to export a TABLE on a cutplane.

Top of pagePrevious messageNext messageBottom of page Link to this message

Augusto (cdfx)
New member
Username: cdfx

Post Number: 2
Registered: 04-2007
Posted on Wednesday, April 11, 2007 - 02:52 pm:   

Hi!

Great, the table is all I need because I try a external viewer.

Have some examples how a make this with TABLE?

I try a little experiment like a cube inside a cilinder or a big cube with a fluid in one direction.

The similar experiment in 2D of them is :

TITLE 'Quad in Center'

COORDINATES cartesian2

VARIABLES
u

SELECT { method controls }
ngrid = 1.0 / 70.0

DEFINITIONS { parameter definitions }
min_domain = 0.0
max_domain = 1.0
min_cube = 0.2
max_cube = 0.8

! INITIAL VALUES

EQUATIONS
div(grad(u)) = 0

! CONSTRAINTS { Integral constraints }

BOUNDARIES
REGION 1
START(min_domain, min_domain)
NATURAL(u) = 1.0
LINE TO (max_domain, min_domain)
NATURAL(u) = 0.0
LINE TO (max_domain, max_domain)
NATURAL(u) = -1.0
LINE TO (min_domain, max_domain)
NATURAL(u) = 0.0
LINE TO CLOSE

REGION 2
START(0.2, 0.2)
VALUE(u) = 0
LINE TO (max_cube, min_cube)
LINE TO (max_cube, max_cube)
LINE TO (min_cube, max_cube)
LINE TO CLOSE

monitors
contour(u)

plots
vector(-dy(u), dx(u)) points = 70 export format "(#x,#y)=(#1,#2)" file "FIELDVECTOR.TXT" as "Field Vector" norm

end

Thanks!

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