Skip to content

Commit

Permalink
update crystal parametrization
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobEliasWagner committed Feb 7, 2024
1 parent ca6d0cc commit 7d94150
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/nos/data/helmholtz/domain_properties/file_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ def read_c_shaped_crystal(config: configparser.ConfigParser) -> List[CrystalDesc
inner_radii = inner_radii.flatten()
gap_widths = gap_widths.flatten()

inner_radii = outer_radii * inner_radii
gap_widths = inner_radii * gap_widths

return [
CShapeDescription(c.grid_size, c.n, outer, inner, gap)
for outer, inner, gap in zip(outer_radii, inner_radii, gap_widths)
Expand Down
4 changes: 2 additions & 2 deletions src/nos/data/helmholtz/mesh/crystal_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ def define_tools(self) -> List[int]:
tools = []

# inner radius and gap in terms of the outer radius
inner_radius = self.crystal_description.radius * self.crystal_description.inner_radius
inner_radius = self.crystal_description.inner_radius
# gaps should be smaller than inner radius
gap_height = min([inner_radius, self.crystal_description.gap_width * self.crystal_description.radius])
gap_height = self.crystal_description.gap_width
tol = 1.1 # to prevent cutting artifacts
gap_width = self.crystal_description.radius * tol

Expand Down

0 comments on commit 7d94150

Please sign in to comment.