Skip to content

DFSU 3D structure from 2D mesh/DFSU? #518

Answered by tomadams-ssf
tomadams-ssf asked this question in Q&A
Discussion options

You must be logged in to vote

Post above was unnecessary - now solved. In case it helps someone else, this can be done by creating Geometry directly using the lower-level function e.g.

geo = mikeio.spatial.FM_geometry.GeometryFM3D(node_coordinates=nc,
element_table=et,
n_sigma=10)

where nc and et are appropriately constructed numpy arrays (figured out structure by comparing node_coordinates and element_table between Dfsu(mesh) and Dfsu(3dOutputFile)).

"geo" can then be used to create a 3d DFSU file by e.g.

newds = mikeio.Dataset(data,time,items,geometry=geo,zn=zn)
newds.to_dfs('outputFilename)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by tomadams-ssf
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants