[Gmsh] Lagrangian mesh

Christophe Geuzaine cgeuzaine at ulg.ac.be
Mon Dec 15 10:20:10 CET 2008


Neil Morrison wrote:
> Hi,
> 
> Is it possible to use Gmsh to visualise / animate a Lagrangian mesh simulation, i.e. with a
> different mesh at each time step (mesh moves with the flow)?
> 
> I write a separate ".msh" file at each time-step, with the current node positions and
> elements, and then in $NodeData I define the fields over the nodes, for the current
> time-step.  So far I could only display the fields for each individual file, I couldn't
> animate them. Each file had to be opened separately.
> 
> I know that Gmsh can animate multiple time-step data provided that the mesh remains the same,
> but in my simulations the mesh is different at each time-step.
> 

Hi Neil - There are two possibilities:

1) with all versions of Gmsh you can save your data into separate 
post-processing views (e.g., one view per mesh), and produce the 
animation by looping over these views instead of looping over the 
"timesteps". (In the GUI: Tools->Options->Post-pro->Cycle through views 
instead of time steps. For an sample script: cf. demos/anim.script.)

However, this can become quite inefficient for large datasets, so 
there's a new way:

2) you can use the new model-based post-processing format, which 
supports multi-model datasets. The user interface is still a bit clumsy, 
though:

- "step1.msh" contains a mesh and a nodal dataset, identified as "step 
0" of the view "A scalar view".

- "step23.msh" contains a different mesh, with 2 time steps (1 and 2) of 
the same view, but on the new model mesh.

When you load the meshes, you have to tell Gmsh to create separate 
models instead of merging all the meshes in the same model. The only 
(clumsy) way to do so at the moment is from the command line:

gmsh step1.msh -new step23.msh

(step1.msh gets merged in the current default model; "-new" tells gmsh 
to push a new empty model on the stack; this model becomes the new 
current model, into which step23.msh is merged. The bottom-left button 
in the graphic window allows to select the current model, in case you'd 
like to merge additional data in it.)

Your feedback is welcome on this new feature...

Christophe

PS: the multi-model stuff is only available in the latest nightly snapshots.







> Many thanks,
> Neil
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
> 
> 


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: step23.msh
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20081215/2270b3b2/attachment.msh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: step1.msh
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20081215/2270b3b2/attachment-0001.msh>