[MBDyn-users] improvement ideas for 1.3.15

masarati at aero.polimi.it masarati at aero.polimi.it
Mon Mar 29 20:31:18 CEST 2010

> Pierangelo,
> ..O.K. we'll wait for 1.3.15 probably having the "time step width driven"
> - option for the output meter.

This is now implemented.  I'll start planning another minor release.

> Two other points for improvement concerning the NetCDF output came into my
> mind:
> 1.)
> I'd like to propose adding a data type switch to the "output results:" -
> card allowing the user to choose between DOUBLE and FLOAT, e.g.:
>      "output results : netcdf , [double | float ] ;"
> Right now double (i.e. 8-byte floating point values) is the only supported
> data type for NetCDF output, which might be influenced by MBDyn's internal
> double precision. But for time series output I think a 4-byte float data
> type would be pretty sufficient in terms of number range and precision for
> most problems. Using float values instead of doubles would halve the
> amount of required disk space (which can be significant for larger models
> and/or long simulations) without a significant loss in precision and I
> think this would impose only minor and relatively simple code changes.

Although the idea is fine, I think it required quite a bit of reworking of
the output code.  In fact, all doubles need to be cast to float before
calling the NetCDF routines, while right now all we do is pass those
routines the location of data in arrays of double.  So I'd prefer not to
modify this right now.

> 2.)
> The second suggestion is to rename the time track variable "run.time" in
> just only "time"  and change its data structure from "(time, vec1)" to
> only "(time)", so having a variable  "time(time)"  instead of
> "run.time(time,vec1)"  , defining the same 1D-array structure. This would
> also hold for other 1D-data series: e.g.  "run.timestep( time )" is
> exactly the same as "run.timestep(time , vec1)" ,so the "vec1" information
> is more or less dispensible.
> Having a variable  "time(time)"  has advantages for many (3rd party)
> NetCDF tools (e.g. plotting tools like ncbrowse, andx, intel array viewer,
> VisIt, ParaView, etc.) as when finding a variable "time(time)" these tools
> automatically understand the time dependency of the other time series data
> in the file (most of them are defined as 2D-array-structures containing
> time series of 3-comp.vectors, e.g. "node.struct.1.X( time, vec3 )" ).
> This slight change would have the advantage of easier making XY plots of
> time series when using the tools mentioned above.
> Right now the time track is not detected correctly resulting in plots
> having the time step index as X-axis instead of the simulation time in
> seconds.
> What do you think of these ideas ? Is it possible and worhty to add them
> too ?

I liked the idea of confining problem-related data under the "run" root,
to avoid polluting the results' namespace.  However, as soon as saving
"time" without any prefix may ease the use of many tools, I see no issue
in changing this.

I'd prefer to leave more specific data, like the time step and the step
number under "run", though.

I have also removed the useless second dimension to scalars.

Cheers, p.

More information about the MBDyn-users mailing list