Delphin Permutations¶
-
delphin_6_automation.delphin_setup.delphin_permutations.
change_boundary_coefficient
(delphin_dict: dict, boundary_condition: str, coefficient: str, new_value: float) → dict[source]¶ Changes a boundary coefficient of a boundary condition instance.
Parameters: - delphin_dict – Delphin dict to change.
- boundary_condition – Name of the boundary condition
- coefficient – Name of the coefficient to change
- new_value – New value of the coefficient
Returns: Modified Delphin dict
-
delphin_6_automation.delphin_setup.delphin_permutations.
change_layer_material
(delphin_dict: dict, original_material: str, new_material: dict) → dict[source]¶ Changes the material of a layer.
Parameters: - delphin_dict – Delphin dict to change.
- original_material – Name of material that should be changed.
- new_material – New material given as a dict. Dict should have the following keys: @name, @color, @hatchCode and #text.
Returns: Modified Delphin dict
-
delphin_6_automation.delphin_setup.delphin_permutations.
change_layer_width
(delphin: dict, original_material: str, new_width: float) → dict[source]¶ Changes the width of a single layer, while keeping number of elements in the project.
Parameters: - delphin – Delphin dict to change.
- original_material – Name of material to change the width of.
- new_width – New width in m
Returns: Modified Delphin dict
-
delphin_6_automation.delphin_setup.delphin_permutations.
change_layer_widths
(delphin_dict: dict, layer_material: str, widths: list) → List[dict][source]¶ Creates a new Delphin dict with the width of each value in widths.
Parameters: - delphin_dict – Delphin dict to change.
- layer_material – Name of material to change the width of.
- widths – New widths in m
Returns: List with modified Delphin dicts
-
delphin_6_automation.delphin_setup.delphin_permutations.
change_orientation
(delphin_dict: dict, new_orientation: int) → dict[source]¶ Changes the orientation of the Delphin project.
Parameters: - delphin_dict – Delphin dict to change.
- new_orientation – New orientation. Value between 0 and 360
Returns: Modified Delphin dict
-
delphin_6_automation.delphin_setup.delphin_permutations.
change_simulation_length
(delphin_dict: dict, simulation_length: int, length_unit: str) → dict[source]¶ Change the simulation length of a Delphin file
-
delphin_6_automation.delphin_setup.delphin_permutations.
change_weather
(delphin_dict: dict, original_weather: str, new_weather: str) → dict[source]¶ Changes the weather file of a weather instance. Can therefore only be used on climate conditions that is loaded from a file.
Parameters: - delphin_dict – Delphin dict to change.
- original_weather – Name of the original weather
- new_weather – New weather file path
Returns: Modified Delphin dict
-
delphin_6_automation.delphin_setup.delphin_permutations.
compute_vapour_diffusion_slope
(heat_slope: float, vapour_exchange: float) → Tuple[float, float][source]¶ Computes the vapour diffusion slope and the vapour diffusion exchange coefficient
-
delphin_6_automation.delphin_setup.delphin_permutations.
convert_discretization_to_list
(delphin_dict: dict) → List[float][source]¶ Get the discretized elements of a project.
Parameters: delphin_dict – Delphin dict to look in. Returns: A list with the discretizated values.
-
delphin_6_automation.delphin_setup.delphin_permutations.
discretize_layer
(width: float, stretch_factor: float = 1.3, minimum_division=0.001, maximum_division=0.2) → List[float][source]¶ Creates a subdivision of the material to be used for the discretization.
Parameters: - width – Width of the material to be subdivided
- minimum_division – Width of the smallest division
- stretch_factor – Increase in subdivisions
- maximum_division – Maximum size of a cell
Returns: List containing width of subdivisions
-
delphin_6_automation.delphin_setup.delphin_permutations.
get_layers
(delphin_dict: dict) → dict[source]¶ Get the layers of a Delphin dict.
Parameters: delphin_dict – Delphin dict to get layers from. Returns: Dict of dicts. Each nested dict has the keys: material, x_width, x_index
-
delphin_6_automation.delphin_setup.delphin_permutations.
get_simulation_length
(delphin_dict: dict) → NamedTuple[source]¶ Get the simulation length of a Delphin file
-
delphin_6_automation.delphin_setup.delphin_permutations.
identify_layer
(layers: dict, identifier: Union[str, int]) → dict[source]¶ Returns a layer given a identifier of that layer. Identifiers can be name of the material or the index of the material.
Parameters: - layers – Layers to look in
- identifier – Identifier to identify layer by
Returns: The found layer
-
delphin_6_automation.delphin_setup.delphin_permutations.
update_assignment_range
(assignment: dict, delta_range: int, range_to_update_after: int) → None[source]¶ Updates the range of a single assignment.
Parameters: - assignment – Assignment to change
- delta_range – Change in range
- range_to_update_after – After which the ranges should be updated
-
delphin_6_automation.delphin_setup.delphin_permutations.
update_output_locations
(delphin: dict) → dict[source]¶ Update the output locations in a Delphin file, so they are located correctly
-
delphin_6_automation.delphin_setup.delphin_permutations.
update_range_of_assignments
(delphin_dict: dict, layer: dict, new_discretization: list) → dict[source]¶ Update the ranges of all assignments in a Delphin dict, given a layer and a new discretization of that layer
Parameters: - delphin_dict – Delphin dict to update
- layer – Layer to update
- new_discretization – New discretization
Returns: Updated Delphin dict