[Gmsh] Making an animation from non-uniform time steps

Christophe Geuzaine cgeuzaine at uliege.be
Thu May 7 07:51:25 CEST 2020



> On 5 May 2020, at 16:09, Jeremy Theler <jeremy at seamplex.com> wrote:
> 
> Hi all
> 
> Say I have a set of $NodeData$s with a temperature distribution from a
> transient heat conduction problem but due to adaptivity the times are
> not equally spaced. Each set has the real tag as a the real time and
> the first integer tag as the time index.
> 
> Any (scalable) idea of how can I get an animation that shows the real
> time advancement?
> 

You can simply set "View.Time" at the desired value at regular intervals, as setting "View.Time" will automatically select the appropriate time step.

Say time in your view goes from 0 to tmax; you could do

For time in {0:tmax:0.01}
  View[0].Time = time;
  Sleep 0.1;
  Draw;
EndFor

in a .geo file. You can use the same idea with the Python API.

Christophe

> Python and linear interpolation between the two closest sets of data
> are fine. I would like to get the general idea, I can work out the
> details.
> 
> 
> Regards
> --
> jeremy theler
> www.seamplex.com
> 
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine






More information about the gmsh mailing list