This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
tips:post [2012/11/27 05:29] gag [ParaView] |
tips:post [2013/06/14 15:30] mschafer [ParaView] |
||
---|---|---|---|
Line 5: | Line 5: | ||
==== ElmerPost ==== | ==== ElmerPost ==== | ||
+ | ElmerPost is the build-in post-processing tools of Elmer. ElmerPost reads result in Elmer Post type file ('' | ||
=== Mesh deformation === | === Mesh deformation === | ||
+ | For transient simulation, ElmerPost doesn' | ||
+ | First define a new variable to store the initial node coordinates. Enter in the command window (bottom of the main window): | ||
+ | < | ||
+ | math on = nodes | ||
+ | </ | ||
+ | Then, in the command box of the timestep window: | ||
+ | < | ||
+ | math nodes = on + Mesh.Update(0: | ||
+ | </ | ||
=== Useful scripts === | === Useful scripts === | ||
+ | A file containing a matc function can be loaded and executed from the command window: | ||
+ | < | ||
+ | source myscript.cmd | ||
+ | myMATCfunction | ||
+ | </ | ||
+ | |||
+ | |||
+ | Below is an example to construct a vector variable from 3 independent variable (useful for the [[solvers: | ||
+ | < | ||
+ | proc tovector {} { | ||
+ | math {Velocity=0}; | ||
+ | math {k=size(Aiflow.1)[1]; | ||
+ | math {Velocity(0, | ||
+ | math {Velocity(1, | ||
+ | math {Velocity(2, | ||
+ | math {Velocity_abs=sqrt(vdot(Velocity, | ||
+ | } | ||
+ | </ | ||
+ | Save it in a file '' | ||
+ | < | ||
+ | load makeVector.cmd | ||
+ | tovector | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
==== ParaView ==== | ==== ParaView ==== | ||
- | Elmer can export results in vtk or vtu formats. | + | Elmer can export results in vtk or vtu formats. |
< | < | ||
Solver 17 | Solver 17 | ||
Line 18: | Line 53: | ||
Equation = " | Equation = " | ||
Procedure = " | Procedure = " | ||
+ | Save Geometry Ids = Logical True ! add this line if you want to access boundaries in Paraview | ||
Output File Name = String " | Output File Name = String " | ||
Output Format = String vtu | Output Format = String vtu | ||
End | End | ||
</ | </ | ||
- | More information regarding this solver can be found in the [[Elmer documentation|http:// | + | More information regarding this solver can be found in the [[http:// |
+ | === More tips when using Paraview: === | ||
+ | // | ||
+ | * **to visualize a variable only on one boundary condition** (for example bedrock):\\ | ||
+ | - Add the line '' | ||
+ | - In paraview: Edit -> Find Data, find Cell, GeometryIDs is = ..., Run Extract Selection\\ | ||
+ | - GeometryIDs usually start from 101\\ | ||
+ | * **to calculate differences between different time-steps or runs** (condition: same mesh)\\ | ||
+ | - Open both files\\ | ||
+ | - Define for both files a Calculator to copy the variables that you want to calculate the difference from under another name, for example //Result ArrayName = temp1 (temp2)// for //Value = Scalars-> | ||
+ | - Select both Calculators: | ||
+ | - Select the new AppendAttributes Item in the list (the one with the cube not the arrows)\\ | ||
+ | - Define again a Calculator with Result '' | ||
+ | - // | ||
+ | * **to mark a certain location by a symbol**\\ | ||
+ | - use Sources -> Sphere and define the origin as the location of your symbol\\ | ||
+ | * **to add a polyline on a 3D figure**\\ | ||
+ | - save the (x,y,z) values of the points of the polyline in an ascii file (separated by "," | ||
+ | - open this file as "comma separated values" | ||
+ | - define the options (with headings or not etc.)\\ | ||
+ | - use TableToPoints Filter\\ | ||
+ | * **Crossections of the ice-body**\\ | ||
+ | - use " | ||
+ | * ** do not use ° in any text**, this leads to errors when saving/ | ||
+ | In this case open the statefile as ascii and delete the ° and it should work again.\\ | ||
+ | * **Iso-contours**\\ | ||
+ | If you want to draw only the lines, but not colored areas, switch " | ||
+ | * to **synchronize the view on different windows** (same layout)\\ | ||
+ | | ||
+ | * |