Skip to content

6. Preprocessing and post processing

xilin xia edited this page May 8, 2020 · 3 revisions

The package hipims_io can be used to create the inputs and visualise the outputs of HiPIMS. You need to have basic knowledge about using Python.

Python version: >=3.6.

To install hipims_io:

pip install hipims_io

A demonstration to setup a HiPIMS input object with a sample DEM:

>>> import hipims_io as hp
>>> obj_in = hp.demo_input() # create an input object and show
>>> obj_in.write_input_files()

After these steps, an sample input is created in the folder where you run Python.

An example of step-by-step setup a HiPIMS input object with more detailed information from sample data:

>>> import os
>>> import hipims_io as hp
>>> case_folder = os.getcwd() # use the current path as a case folder
>>> obj_dem, model_data = hp.get_sample_data() # get sample data
>>> obj_in = InputHipims(dem_data=obj_dem, num_of_sections=1, case_folder=case_folder)
# set a initial water depth of 0.5 m
>>> obj_in.set_parameter('h0', 0.5)
# set boundary condition
>>> bound_list = demo_data['boundary_condition'] # with boundary information
>>> obj_in.set_boundary_condition(bound_list, outline_boundary='fall')
# set rainfall mask and source
>>> rain_source = demo_data['rain_source']
>>> obj_in.set_rainfall(rain_mask=0, rain_source=rain_source)
# set monitor positions
>>> gauges_pos = demo_data['gauges_pos']
>>> obj_in.set_gauges_position(gauges_pos) 
# display model information
>>> obj_in.domain_show() # show domain map
>>> print(obj_in) # print model summary
# write all input files for HiPIMS
>>> obj_in.write_input_files()

You can use the help function of python to view detailed documentation of hipims_io. Alternatively, you can use PyDoc to view the documentation in web browser. To do so, you need to run the following command in terminal

pydoc -b

Then search hipims_io in the search box to open the documentation.

Clone this wiki locally