Warning: Undefined array key 1 in /home/np29546/public_html/elmerice/wiki/inc/auth.php on line 78

Warning: Cannot modify header information - headers already sent by (output started at /home/np29546/public_html/elmerice/wiki/inc/auth.php:78) in /home/np29546/public_html/elmerice/wiki/inc/auth.php on line 431

Warning: Undefined array key "DOKU_PREFS" in /home/np29546/public_html/elmerice/wiki/inc/common.php on line 2082

Warning: Cannot modify header information - headers already sent by (output started at /home/np29546/public_html/elmerice/wiki/inc/auth.php:78) in /home/np29546/public_html/elmerice/wiki/inc/common.php on line 2090

Warning: Cannot modify header information - headers already sent by (output started at /home/np29546/public_html/elmerice/wiki/inc/auth.php:78) in /home/np29546/public_html/elmerice/wiki/inc/actions.php on line 38
tips:post [Elmer/Ice Wiki]

Warning: Undefined array key 14 in /home/np29546/public_html/elmerice/wiki/inc/html.php on line 1453

Warning: Undefined array key -1 in /home/np29546/public_html/elmerice/wiki/inc/html.php on line 1458

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tips:post [2012/11/21 22:09]
gag created
tips:post [2013/06/27 15:57]
mschafer [ParaView] Tips: finished with what I could come up with
Line 5: Line 5:
  
 ==== ElmerPost ==== ==== ElmerPost ====
 +ElmerPost is the build-in post-processing tools of Elmer. ElmerPost reads result in Elmer Post type file (''.ep''). 
  
 +=== Mesh deformation ===
 +For transient simulation, ElmerPost doesn't upgrade directly the mesh using the variable ''Mesh Update''. This has to be done manually, as follow.
 +First define a new variable to store the initial node coordinates. Enter in the command window (bottom of the main window):
 +<code>
 +math on = nodes
 +</code>
 +Then, in the command box of the timestep window:
 +<code>
 +math nodes = on + Mesh.Update(0:2,time($t)))
 +</code>
  
-==== ParaView ====+=== Useful scripts === 
 +A file containing a matc function can be loaded and executed from the command window: 
 +<code> 
 +source myscript.cmd 
 +myMATCfunction 
 +</code>
  
 +
 +Below is an example to construct a vector variable from 3 independent variable (useful for the [[solvers:aiflow|AIFlow]] and [[solvers:porous|Porous]] solvers):
 +<code>
 +proc tovector {} {
 +math {Velocity=0};
 +math {k=size(Aiflow.1)[1];}
 +math {Velocity(0,0:k-1)=Aiflow.1};
 +math {Velocity(1,0:k-1)=Aiflow.2};
 +math {Velocity(2,0:k-1)=0};
 +math {Velocity_abs=sqrt(vdot(Velocity,Velocity))};
 +}
 +</code>
 +Save it in a file ''makeVector.cmd'' and execute it as follow:
 +<code>
 +load makeVector.cmd
 +tovector
 +</code>
 +
 +
 +
 +==== ParaView ====
 +Elmer can export results in vtk or vtu formats. Since version 6128, this can be done automatically by setting the extension of the ''Post File'' to ''vtu'' in the Simulation section. Doing so, only a vtu output file is created (no ep file for ElmerPost). Alternatively, the following solver  can be added and run after all other solvers:
 +<code>
 +Solver 17
 +  Exec Solver = After TimeStep
 +  Exec Interval = 2
 +  Equation = "result output"
 +  Procedure = "ResultOutputSolve" "ResultOutputSolver"
 +  Save Geometry Ids = Logical True ! add this line if you want to access boundaries in Paraview
 +  Output File Name = String "myFile.vtu"
 +  Output Format = String vtu
 +End
 +</code>
 +More information regarding this solver can be found in the [[http://www.csc.fi/english/pages/elmer/documentation|Elmer documentation]]. More information regarding the Paraview software can be found [[http://www.paraview.org|here]]. 
  
  
 +=== Some tips when using Paraview: ===
 +  * **to visualize a variable only on one boundary condition** (for example bedrock):\\
 +- Add the line ''Save Geometry Ids = Logical True'' to your sif-file\\
 +- 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-> temp//\\
 +- Select both Calculators: Filters -> Append Attributes\\
 +- Select the new AppendAttributes Item in the list (the one with the cube not the arrows)\\
 +- Define again a Calculator with Result ''ArrayName=difftemp'' and ''Value= Scalars->temp2 - Scalars->temp1''\\
 +- //difftemp// contains now the difference\\
 +  * **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 "," or another symbol) with the ending ".csv"\\
 +- open this file as "comma separated values"-file in paraview\\
 +- define the options (with headings or not etc.)\\
 +- use TableToPoints Filter\\
 +  * **Crossections of the ice-body**\\
 +- use "Slice" or "Clip"\\
 +  * ** do not use ° in any text**, this leads to errors when saving/loading a statefile.\\
 +If it has happened, open the statefile as ascii file and delete the ° and it should work again.\\
 +  *  **Iso-contours**\\
 +To draw only the lines, but not colored areas, switch "Compute Normals off", that helps in most of the cases.\\
 +  * to **synchronize the view on different windows** (same zoom, view angle,...)\\
 +- click right on the first window\\
 +- click on ''link camera''\\
 +- once the window ''click on another window'' appears click on the second window"
tips/post.txt · Last modified: 2013/06/27 15:57 by mschafer
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0