ocmw.design.otm_bcfile module¶
Tools for generating an Open Telemac-Mascaret boundary condtions file (*.cli) from a *.msh ASCII file.
Parse the command-line arguments. |
|
Initialise the OpenTelemac oupt boundary conditions file to be generated. |
|
Generate output string for curent boundary node to write to the OpenTelemac boundary conditions file. |
|
Sort mesh boundary elemets by ID |
|
Get the mesh boundary elements and sort by boundary ID |
|
Get the mesh boundary nodes from mesh boundary elements |
|
Create an Open Telemac-Mascaret boundary condtions file |
|
Generate an Open Telemac-Mascaret boundary condtions file from a GMsh mesh file that includes bathymetry. |
Tools for generating an OpenTelemac boundary condtions file (*.cli) from a Gmsh ASCII mesh file that has the bathymetry (z level) data included.
- ocmw.design.otm_bcfile.parse_arguments()[source]¶
Parse the command-line arguments.
- Returns:
arguments (Name-space) – A python name-space containing all the command-line arguments
- ocmw.design.otm_bcfile.initialise_bc_file(datapath, clifile)[source]¶
Initialise the OpenTelemac oupt boundary conditions file to be generated.
- Parameters:
datapath (string) – Full path string to where the file is to be generated.
clifile (string) – Name of the OpenTelemac boundary conditions file to generate.
- Returns:
fhnd (file object) – Handle to the open file object.
- ocmw.design.otm_bcfile.clistr(bndcond, trctype, node, elem, bndname)[source]¶
Generate output string for curent boundary node to write to the OpenTelemac boundary conditions file.
- Parameters:
bndcond (string) – Space delimited 3 digit string defining the boundary condition type. The dafault is ‘5 6 6’ - open bounddary with prescribed UV and H.
trctype (string) – A single character string defining the tracer condition for the current boundary node. The dafault is ‘4’ Free tracers.
node (string) – Model boundary node ID as a string.
elem (string) – Sequential counter value for node element in boundary conditions file.
bndname (string) – Open boundary name identifier.
- Returns:
line (string) – Formmated line to write to the OpenTelemac boundary conditions file.
- ocmw.design.otm_bcfile.extract_mshbnds(datapath, mshfile)[source]¶
Get the mesh boundary elements and sort by boundary ID
- ocmw.design.otm_bcfile.extract_bnd_nodes(mshbnds, bndids)[source]¶
Get the mesh boundary nodes from mesh boundary elements