2010/5/21 Geordie McBain <[email protected]>: > 2010/5/20 marco restelli <[email protected]>: >> Hi all, >> I would be interested in working with gmsh and FreeFem++ >> (http://www.freefem.org/ff++/), using FreeFem for the finite element >> computations and gmsh for data visualization and postprocessing. Does >> anybody have suggestions about the most effective way to get data from >> FreeFem into gmsh?
> I use Gmsh a lot for FreeFem++ pre- and postprocessing. The way I get > the data from FreeFem++ into Gmsh is to write an ASCII .msh file, > following the format description at > > http://geuz.org/gmsh/doc/texinfo/gmsh.html#MSH-ASCII-file-format > > using some FreeFem++ macros I've written, exploiting the techniques > from Section 5.1.4 `Mesh connectivity' of the FreeFem++ manual. I > attach a modification of FreeFem++ example 3.1 which uses the macros > in writemsh.edp to write the result file membrane.msh for Gmsh. I received a query about this off the list, about whether this can be extended to transient simulations. It can, and I reply here, to keep it on the public record. Again, I modify a very simple example from the FreeFem++ manual; in this case the first transient simulation, which is in Section 3.4 `Thermal conduction'. This is strictly for transient simulation on a fixed mesh. The idea is to write the mesh to one file at the outset, and then at each time-step save the instantaneous solution to a new file containing just a MeshFormat block and a NodeData block. Finally, open all the output .msh files simultaneously in Gmsh. This example is two-dimensional, but that's just for brevity: it works just as well in three dimensions, even on big problems (as big as I've tried anyway). This example produces 52 output files (1 mesh plus 51 snapshots, from t = 0 to t = 5.0, in steps of 0.1), but I only attach a couple here.
thermic-g.edp
Description: Binary data
writemsh.edp
Description: Binary data
thermic-g.0.msh
Description: Mesh model
thermic-g.10.msh
Description: Mesh model
thermic-g.20.msh
Description: Mesh model
_______________________________________________ gmsh mailing list [email protected] http://www.geuz.org/mailman/listinfo/gmsh
