GDF manipulating - shiplab/wamit GitHub Wiki
import gdf_class
A class for manipulating the geometrical data file (GDF).
The main use is to obtain the hydrostatics properties to export a model in new loading conditions.
It is also possible to scale the original mesh to obtain a vessel with new dimensions.
ship = gdf_class.GDF('ship.gdf')
The command above loads a gdf file and creates
ship.props(T=[], KG=[])
Optional Inputs:
-
T
: new draft, if it is empty or greater than Depth it will be equal to depth. -
KG
: new KG, if it is empty it will be equal to original KG evaluated from the mesh.
ship.gdf_scale(Lf, Bf, Df, T=[], KG=[])
Required inputs:
-
Lf
: Final length -
Bf
: Final Beam -
Df
: Final Depth
Optional inputs:
-
T
: new draft, if it is empty or greater than Depth it will be equal to depth. -
KG
: new KG, if it is empty it will be equal to original KG evaluated from the mesh.
ship.gdf_write(self, gdf_out, path_out=[], LWL_rhino=False)
Required inputs:
-
gdf_out
: name of gdf file. Example:ship2.gdf
Optional inputs:
-
path_out
: path to export the gdf file -
LWL_rhino
: flag to call function to generate the irr surface using Rhino 5. If Rhino 5 is not installed must be equalFalse
ship.export_low_order_tri(self, gdf_out, path_out=[])
Required inputs:
-
gdf_out
: name of gdf file. Example:ship2.gdf
Optional inputs:
-
path_out
: path to export the gdf file