Skip to content

Commit

Permalink
creating heliostats3d module similar to panels3d
Browse files Browse the repository at this point in the history
  • Loading branch information
brookeslawski committed Sep 30, 2024
1 parent 7c7ff10 commit e7977ed
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion input/single_heliostat.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
general:
geometry_module: panels3d
geometry_module: heliostats3d
output_dir: output/heliostat
mesh_only: false
structural_analysis: true
Expand Down
3 changes: 2 additions & 1 deletion pvade/fluid/boundary_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def __call__(self, x):
* x[1]
* (self.params.domain.y_max - x[1])
)
elif self.params.general.geometry_module == "panels3d":
elif (self.params.general.geometry_module == "panels3d" or self.params.general.geometry_module == "heliostats3d"):

if self.current_time < 2.0 and self.params.fluid.time_varying_inflow_bc:
time_vary_u_ref = (
Expand Down Expand Up @@ -295,6 +295,7 @@ def build_velocity_boundary_conditions(domain, params, functionspace, current_ti
if (
params.general.geometry_module == "panels2d"
or params.general.geometry_module == "panels3d"
or params.general.geometry_module == "heliostats3d"
or params.general.geometry_module == "flag2d"
):
for location in (
Expand Down
8 changes: 6 additions & 2 deletions pvade/geometry/MeshManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def _get_domain_markers(self, params):
if (
params.general.geometry_module == "panels2d"
or params.general.geometry_module == "panels3d"
or params.general.geometry_module == "heliostats3d"
):
for panel_id in range(
params.pv_array.stream_rows * params.pv_array.span_rows
Expand Down Expand Up @@ -141,13 +142,15 @@ def build(self, params):
# Only rank 0 builds the geometry and meshes the domain
if self.rank == 0:
if (
params.general.geometry_module == "panels3d"
(params.general.geometry_module == "panels3d"
or params.general.geometry_module == "heliostats3d")
and params.general.fluid_analysis == True
and params.general.structural_analysis == True
):
self.geometry.build_FSI(params)
elif (
params.general.geometry_module == "panels3d"
(params.general.geometry_module == "panels3d"
or params.general.geometry_module == "heliostats3d")
and params.general.fluid_analysis == False
and params.general.structural_analysis == True
):
Expand Down Expand Up @@ -205,6 +208,7 @@ def build(self, params):

if (
params.general.geometry_module == "panels3d"
or params.general.geometry_module == "heliostats3d"
or params.general.geometry_module == "flag2d"
):
self._create_submeshes_from_parent(params)
Expand Down
2 changes: 1 addition & 1 deletion pvade/geometry/template/TemplateDomainCreation.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def mark_surfaces(self, params, domain_markers):
else:
if params.general.geometry_module == "cylinder3d":
domain_markers[f"cylinder_side"]["gmsh_tags"].append(surf_id)
elif params.general.geometry_module == "panels3d":
elif (params.general.geometry_module == "panels3d" or params.general.geometry_module == "heliostats3d"):
# tgging in 3d starts with all panels then moves to domain boundaries
# false panels start after boundary
if surf_id < surf_tag_list[0][1] + num_of_panel_facets * (
Expand Down
2 changes: 1 addition & 1 deletion pvade/structure/boundary_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def __call__(self, x):
* (0.41 - x[1])
/ (0.41**2)
)
elif self.params.general.example == "panels3d":
elif (self.params.general.example == "panels3d" or self.params.general.example == "heliostats3d"):
inflow_values[0] = (
(self.params.fluid.u_ref)
* np.log(((x[2]) - d0) / z0)
Expand Down

0 comments on commit e7977ed

Please sign in to comment.