bim2sim.plugins.PluginOpenFOAM.bim2sim_openfoam.task package
Submodules
bim2sim.plugins.PluginOpenFOAM.bim2sim_openfoam.task.add_comfort module
bim2sim.plugins.PluginOpenFOAM.bim2sim_openfoam.task.create_openfoam_geometry module
- class bim2sim.plugins.PluginOpenFOAM.bim2sim_openfoam.task.create_openfoam_geometry.CreateOpenFOAMGeometry(playground)
Bases:
ITask
This ITask initializes the OpenFOAM Geometry.
- adjust_refinements(case, openfoam_elements)
Compute surface and region refinements for air terminals and other interior elements.
- create_airterminal_shapes(openfoam_case, air_terminal_surface, inlet_type, outlet_type)
- create_furniture_shapes(openfoam_case, furniture_surface, x_gap=0.8, y_gap=0.8, side_gap=0.8)
- create_people_shapes(openfoam_case, furniture_surface)
- static export_airterminal_triSurface(openfoam_elements)
- static export_furniture_triSurface(openfoam_elements)
- static export_heater_triSurface(openfoam_elements)
- static export_people_triSurface(openfoam_elements)
- static export_stlbound_triSurface(openfoam_case, openfoam_elements)
- generate_grid_positions(furniture_surface, obj_to_be_placed, requested_amount, x_gap=0.2, y_gap=0.35, side_gap=0.6)
- generate_grid_positions_w_constraints(furniture_surface, obj_to_be_placed, requested_amount, min_x_space=0.5, min_y_distance=0.4, max_obj_rows_per_block=30, max_obj_single_escape=10, max_obj_two_escape=20, escape_route_width=1.2, doors=[], min_distance_last_row=0.0, min_dist_all_sides=0.1, min_rows_per_block=3, min_seats_single_escape=3, allow_skip_scanline=False)
- get_base_surface(openfoam_case, openfoam_elements)
- static get_boundaries_of_heater(openfoam_case, heater_window, heater_depth=0.08)
- init_airterminals(openfoam_case, elements, openfoam_elements, inlet_type, outlet_type)
- init_furniture(openfoam_case, elements, openfoam_elements)
- init_heater(openfoam_case, elements, openfoam_elements)
- init_people(openfoam_case, elements, openfoam_elements)
- static init_zone(openfoam_case, elements, openfoam_elements, space_guid='2RSCzLOBz4FAK$_wE8VckM')
- reads: Tuple[str] = ('openfoam_case', 'elements')
- run(openfoam_case, elements)
Run tasks.
- single_use = False
- touches: Tuple[str] = ('openfoam_case', 'openfoam_elements')
- bim2sim.plugins.PluginOpenFOAM.bim2sim_openfoam.task.create_openfoam_geometry.create_stl_from_shape_single_solid_name(triangulated_shape, stl_file_path_name, solid_name)
bim2sim.plugins.PluginOpenFOAM.bim2sim_openfoam.task.create_openfoam_meshing module
- class bim2sim.plugins.PluginOpenFOAM.bim2sim_openfoam.task.create_openfoam_meshing.CreateOpenFOAMMeshing(playground)
Bases:
ITask
This ITask initializes the OpenFOAM Meshing.
- static add_topoSetDict_for_heating(openfoam_case, openfoam_elements)
- create_blockMesh(openfoam_case, resize_factor=0.1, shape=None)
- create_snappyHexMesh(openfoam_case, openfoam_elements)
- static create_surfaceFeatureExtract(openfoam_case)
Initialize surfaceFeatureExtractDict
- static modify_topoSet_for_evaluation(openfoam_case, openfoam_elements)
- reads: Tuple[str] = ('openfoam_case', 'openfoam_elements')
- run(openfoam_case, openfoam_elements)
Run tasks.
- static set_refinementSurfaces(openfoam_case, openfoam_elements, region_names, default_refinement_level=[1, 2])
- touches: Tuple[str] = ('openfoam_case', 'openfoam_elements')
- update_blockMeshDict_air(openfoam_case, openfoam_elements)
- update_snappyHexMesh_air(openfoam_case, openfoam_elements)
- update_snappyHexMesh_furniture(openfoam_case, openfoam_elements)
- update_snappyHexMesh_heating(openfoam_case, openfoam_elements)
- update_snappyHexMesh_mesh_controls(openfoam_case)
- update_snappyHexMesh_people(openfoam_case, openfoam_elements)
bim2sim.plugins.PluginOpenFOAM.bim2sim_openfoam.task.init_openfoam_setup module
- class bim2sim.plugins.PluginOpenFOAM.bim2sim_openfoam.task.init_openfoam_setup.InitializeOpenFOAMSetup(playground)
Bases:
ITask
This ITask initializes the OpenFOAM Setup.
- static create_controlDict(openfoam_case, total_iterations)
- static create_decomposeParDict(openfoam_case)
- create_directory(openfoam_case)
- static create_fvSchemes(openfoam_case)
- static create_fvSolution(openfoam_case)
- static create_g(openfoam_case)
- static create_jobscripts(openfoam_case, simsettings)
- static create_radiationProperties(openfoam_case)
- static create_thermophysicalProperties(openfoam_case)
- static create_turbulenceProperties(openfoam_case)
- read_ep_results(openfoam_case, year=1900, date='12/21', time=11)
- reads: Tuple[str] = ()
- run()
Run tasks.
- single_use = False
- touches: Tuple[str] = ('openfoam_case',)
bim2sim.plugins.PluginOpenFOAM.bim2sim_openfoam.task.run_meshing module
- class bim2sim.plugins.PluginOpenFOAM.bim2sim_openfoam.task.run_meshing.RunOpenFOAMMeshing(playground)
Bases:
ITask
This ITask runs the openfoam meshing on linux systems.
In case of error messages, please check the following hints, especially when working with Anaconda environments and PyCharm. - Check which version of OpenFOAM you have installed and if you can access it from the terminal (e.g. ‘blockMesh’/’which blockMesh’). If the specified path is not the one you’d like to use, please add the OpenFOAM installation path to the PATH system variable. - Check which version of OpenMPI you have installed and if you can access it from the terminal (e.g. ‘mpirun’/’which mpirun’). Make sure to not use the MPI included in Anaconda and adjust the path in the .bashrc accordingly or set a symbolic link. - For error messages like: ‘error loading shared libraries’, please make sure that PyCharm includes all system path variables, especially LD_LIBRARY_PATH by checking Run Configurations -> Environment Variables. If it is not included automatically, add it manually. The value must be the same as the output you get from ‘echo $LD_LIBRARY_PATH’.
- reads: Tuple[str] = ('openfoam_case',)
- run(openfoam_case)
Run tasks.
- touches: Tuple[str] = ()
bim2sim.plugins.PluginOpenFOAM.bim2sim_openfoam.task.run_openfoam_simulation module
bim2sim.plugins.PluginOpenFOAM.bim2sim_openfoam.task.set_boundary_conditions module
- class bim2sim.plugins.PluginOpenFOAM.bim2sim_openfoam.task.set_boundary_conditions.SetOpenFOAMBoundaryConditions(playground)
Bases:
ITask
This ITask initializes the OpenFOAM Setup.
- static add_fvOptions_for_heating(openfoam_case, openfoam_elements)
- assign_ep_results(openfoam_elements, openfoam_case, add_floor_heating=False)
- static create_AoA(openfoam_case, openfoam_elements)
- static create_G(openfoam_case, openfoam_elements)
- static create_IDefault(openfoam_case, openfoam_elements)
- static create_T(openfoam_case, openfoam_elements)
- static create_U(openfoam_case, openfoam_elements)
- static create_alphat(openfoam_case, openfoam_elements)
- static create_boundaryRadiationProperties(openfoam_case, openfoam_elements)
- static create_k(openfoam_case, openfoam_elements)
- static create_nut(openfoam_case, openfoam_elements)
- static create_omega(openfoam_case, openfoam_elements)
- static create_p(openfoam_case, openfoam_elements)
- create_p_rgh(openfoam_case, openfoam_elements)
- static create_qr(openfoam_case, openfoam_elements)
- init_boundary_conditions(openfoam_case, openfoam_elements)
- reads: Tuple[str] = ('openfoam_elements', 'openfoam_case')
- run(openfoam_elements, openfoam_case)
Run tasks.
- touches: Tuple[str] = ('openfoam_case', 'openfoam_elements')