From 36e2c0954f98c3a56bbf3f27733393ab03e356e3 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Mon, 4 Mar 2024 17:43:44 -0600 Subject: [PATCH 1/8] Clarified how r2 parameter for Cones work. --- openmc/surface.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/openmc/surface.py b/openmc/surface.py index a16b6712d6c..97d78232f40 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -1757,7 +1757,9 @@ class Cone(QuadricMixin, Surface): z0 : float, optional z-coordinate of the apex in [cm]. Defaults to 0. r2 : float, optional - Parameter related to the aperature. Defaults to 1. + Parameter related to the aperature [cm^2] + This is the square of the radius of the cone 1 cm from. + This can also be treated as the square of the slope of the cone relative to its axis. dx : float, optional x-component of the vector representing the axis of the cone. Defaults to 0. @@ -1791,7 +1793,7 @@ class Cone(QuadricMixin, Surface): z0 : float z-coordinate of the apex in [cm] r2 : float - Parameter related to the aperature + Parameter related to the aperature [cm^2] dx : float x-component of the vector representing the axis of the cone. dy : float @@ -1909,7 +1911,9 @@ class XCone(QuadricMixin, Surface): z0 : float, optional z-coordinate of the apex in [cm]. Defaults to 0. r2 : float, optional - Parameter related to the aperature. Defaults to 1. + Parameter related to the aperature [cm^2]. + This is the square of the radius of the cone 1 cm from. + This can also be treated as the square of the slope of the cone relative to its axis. boundary_type : {'transmission, 'vacuum', 'reflective', 'white'}, optional Boundary condition that defines the behavior for particles hitting the surface. Defaults to transmissive boundary condition where particles @@ -2004,7 +2008,9 @@ class YCone(QuadricMixin, Surface): z0 : float, optional z-coordinate of the apex in [cm]. Defaults to 0. r2 : float, optional - Parameter related to the aperature. Defaults to 1. + Parameter related to the aperature [cm^2]. + This is the square of the radius of the cone 1 cm from. + This can also be treated as the square of the slope of the cone relative to its axis. boundary_type : {'transmission, 'vacuum', 'reflective', 'white'}, optional Boundary condition that defines the behavior for particles hitting the surface. Defaults to transmissive boundary condition where particles @@ -2099,7 +2105,9 @@ class ZCone(QuadricMixin, Surface): z0 : float, optional z-coordinate of the apex in [cm]. Defaults to 0. r2 : float, optional - Parameter related to the aperature. Defaults to 1. + Parameter related to the aperature [cm^2]. + This is the square of the radius of the cone 1 cm from. + This can also be treated as the square of the slope of the cone relative to its axis. boundary_type : {'transmission, 'vacuum', 'reflective', 'white'}, optional Boundary condition that defines the behavior for particles hitting the surface. Defaults to transmissive boundary condition where particles From fce461ceb8b115a1e947aef781122182d254fe0a Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Mon, 4 Mar 2024 17:50:32 -0600 Subject: [PATCH 2/8] Added notes pointing to onesided cones from cone. --- openmc/surface.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/openmc/surface.py b/openmc/surface.py index 97d78232f40..b84e2da6602 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -1748,6 +1748,11 @@ def evaluate(self, point): class Cone(QuadricMixin, Surface): """A conical surface parallel to the x-, y-, or z-axis. + .. Note:: + This creates a double cone, which is two "traditional" cones that meet at their apex. + For a "traditional" cone see :class:`~openmc.model.XConeSided`, + :class:`~openmc.model.YConeSided`, and :class:`~openmc.model.ZConeSided`. + Parameters ---------- x0 : float, optional @@ -1902,6 +1907,10 @@ class XCone(QuadricMixin, Surface): """A cone parallel to the x-axis of the form :math:`(y - y_0)^2 + (z - z_0)^2 = r^2 (x - x_0)^2`. + .. Note:: + This creates a double cone, which is two "traditional" cones that meet at their apex. + For a "traditional" cone see :class:`~openmc.model.XConeSided`. + Parameters ---------- x0 : float, optional @@ -1999,6 +2008,10 @@ class YCone(QuadricMixin, Surface): """A cone parallel to the y-axis of the form :math:`(x - x_0)^2 + (z - z_0)^2 = r^2 (y - y_0)^2`. + .. Note:: + This creates a double cone, which is two "traditional" cones that meet at their apex. + For a "traditional" cone see :class:`~openmc.model.YConeSided`. + Parameters ---------- x0 : float, optional @@ -2096,6 +2109,10 @@ class ZCone(QuadricMixin, Surface): """A cone parallel to the z-axis of the form :math:`(x - x_0)^2 + (y - y_0)^2 = r^2 (z - z_0)^2`. + .. Note:: + This creates a double cone, which is two "traditional" cones that meet at their apex. + For a "traditional" cone see :class:`~openmc.model.ZConeSided`. + Parameters ---------- x0 : float, optional From b9448fb0267024730415a688b78ef7340418c816 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Wed, 6 Mar 2024 14:50:59 -0600 Subject: [PATCH 3/8] Updated note on cone to be cleaner. --- openmc/surface.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/openmc/surface.py b/openmc/surface.py index b84e2da6602..b85c209db20 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -1749,8 +1749,8 @@ class Cone(QuadricMixin, Surface): """A conical surface parallel to the x-, y-, or z-axis. .. Note:: - This creates a double cone, which is two "traditional" cones that meet at their apex. - For a "traditional" cone see :class:`~openmc.model.XConeSided`, + This creates a double cone, which is two one-sides cones that meet at their apex. + For a one-sided cone see :class:`~openmc.model.XConeSided`, :class:`~openmc.model.YConeSided`, and :class:`~openmc.model.ZConeSided`. Parameters @@ -1908,8 +1908,8 @@ class XCone(QuadricMixin, Surface): r^2 (x - x_0)^2`. .. Note:: - This creates a double cone, which is two "traditional" cones that meet at their apex. - For a "traditional" cone see :class:`~openmc.model.XConeSided`. + This creates a double cone, which is two one-sided cones that meet at their apex. + For a one-sided cone see :class:`~openmc.model.XConeSided`. Parameters ---------- @@ -2009,8 +2009,8 @@ class YCone(QuadricMixin, Surface): r^2 (y - y_0)^2`. .. Note:: - This creates a double cone, which is two "traditional" cones that meet at their apex. - For a "traditional" cone see :class:`~openmc.model.YConeSided`. + This creates a double cone, which is two one-sided cones that meet at their apex. + For a one-sided cone see :class:`~openmc.model.YConeSided`. Parameters ---------- @@ -2110,8 +2110,8 @@ class ZCone(QuadricMixin, Surface): r^2 (z - z_0)^2`. .. Note:: - This creates a double cone, which is two "traditional" cones that meet at their apex. - For a "traditional" cone see :class:`~openmc.model.ZConeSided`. + This creates a double cone, which is two one-sided cones that meet at their apex. + For a one-sided cone see :class:`~openmc.model.ZConeSided`. Parameters ---------- From ad01f48f5a9b40dbe3db6289a70c9d794b61b950 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Wed, 6 Mar 2024 14:51:18 -0600 Subject: [PATCH 4/8] Updated phrasing for r_squared. --- openmc/surface.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/openmc/surface.py b/openmc/surface.py index b85c209db20..d22d8d01341 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -1762,9 +1762,9 @@ class Cone(QuadricMixin, Surface): z0 : float, optional z-coordinate of the apex in [cm]. Defaults to 0. r2 : float, optional - Parameter related to the aperature [cm^2] - This is the square of the radius of the cone 1 cm from. - This can also be treated as the square of the slope of the cone relative to its axis. + Parameter related to the aperture [:math:`\\rm cm^2`]. + It can be interpreted as the increase in the radius squared per cm along + the cone's axis of revolution. dx : float, optional x-component of the vector representing the axis of the cone. Defaults to 0. @@ -1920,9 +1920,9 @@ class XCone(QuadricMixin, Surface): z0 : float, optional z-coordinate of the apex in [cm]. Defaults to 0. r2 : float, optional - Parameter related to the aperature [cm^2]. - This is the square of the radius of the cone 1 cm from. - This can also be treated as the square of the slope of the cone relative to its axis. + Parameter related to the aperture [:math:`\\rm cm^2`]. + It can be interpreted as the increase in the radius squared per cm along + the cone's axis of revolution. boundary_type : {'transmission, 'vacuum', 'reflective', 'white'}, optional Boundary condition that defines the behavior for particles hitting the surface. Defaults to transmissive boundary condition where particles @@ -2021,9 +2021,9 @@ class YCone(QuadricMixin, Surface): z0 : float, optional z-coordinate of the apex in [cm]. Defaults to 0. r2 : float, optional - Parameter related to the aperature [cm^2]. - This is the square of the radius of the cone 1 cm from. - This can also be treated as the square of the slope of the cone relative to its axis. + Parameter related to the aperture [:math:`\\rm cm^2`]. + It can be interpreted as the increase in the radius squared per cm along + the cone's axis of revolution. boundary_type : {'transmission, 'vacuum', 'reflective', 'white'}, optional Boundary condition that defines the behavior for particles hitting the surface. Defaults to transmissive boundary condition where particles From cf0b08d4949c33d3c4ba6bf99f902522c4c5b924 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Wed, 6 Mar 2024 17:19:19 -0600 Subject: [PATCH 5/8] Correct class names in links. --- openmc/surface.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openmc/surface.py b/openmc/surface.py index d22d8d01341..618b59cb278 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -1750,8 +1750,8 @@ class Cone(QuadricMixin, Surface): .. Note:: This creates a double cone, which is two one-sides cones that meet at their apex. - For a one-sided cone see :class:`~openmc.model.XConeSided`, - :class:`~openmc.model.YConeSided`, and :class:`~openmc.model.ZConeSided`. + For a one-sided cone see :class:`~openmc.model.XConeOneSided`, + :class:`~openmc.model.YConeOneSided`, and :class:`~openmc.model.ZConeOneSided`. Parameters ---------- @@ -1909,7 +1909,7 @@ class XCone(QuadricMixin, Surface): .. Note:: This creates a double cone, which is two one-sided cones that meet at their apex. - For a one-sided cone see :class:`~openmc.model.XConeSided`. + For a one-sided cone see :class:`~openmc.model.XConeOneSided`. Parameters ---------- @@ -2010,7 +2010,7 @@ class YCone(QuadricMixin, Surface): .. Note:: This creates a double cone, which is two one-sided cones that meet at their apex. - For a one-sided cone see :class:`~openmc.model.YConeSided`. + For a one-sided cone see :class:`~openmc.model.YConeOneSided`. Parameters ---------- @@ -2111,7 +2111,7 @@ class ZCone(QuadricMixin, Surface): .. Note:: This creates a double cone, which is two one-sided cones that meet at their apex. - For a one-sided cone see :class:`~openmc.model.ZConeSided`. + For a one-sided cone see :class:`~openmc.model.ZConeOneSided`. Parameters ---------- From 7cf1694302c8807bd39b392f038865cdf4f03f8f Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Wed, 6 Mar 2024 17:22:27 -0600 Subject: [PATCH 6/8] Fixed typo in docs. --- openmc/surface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/surface.py b/openmc/surface.py index 618b59cb278..bc10f7e8a47 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -1749,7 +1749,7 @@ class Cone(QuadricMixin, Surface): """A conical surface parallel to the x-, y-, or z-axis. .. Note:: - This creates a double cone, which is two one-sides cones that meet at their apex. + This creates a double cone, which is two one-sided cones that meet at their apex. For a one-sided cone see :class:`~openmc.model.XConeOneSided`, :class:`~openmc.model.YConeOneSided`, and :class:`~openmc.model.ZConeOneSided`. From 4367bca925c0e8e7affa8aa84a1e86040dd66fd8 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Wed, 6 Mar 2024 17:36:21 -0600 Subject: [PATCH 7/8] Clarified r2 for ConeOneSided --- openmc/model/surface_composite.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/openmc/model/surface_composite.py b/openmc/model/surface_composite.py index e4b7020d891..66e54233523 100644 --- a/openmc/model/surface_composite.py +++ b/openmc/model/surface_composite.py @@ -634,7 +634,9 @@ class XConeOneSided(CompositeSurface): z0 : float, optional z-coordinate of the apex. Defaults to 0. r2 : float, optional - Parameter related to the aperature. Defaults to 1. + Parameter related to the aperture [:math:`\\rm cm^2`]. + It can be interpreted as the increase in the radius squared per cm along + the cone's axis of revolution. up : bool Whether to select the side of the cone that extends to infinity in the positive direction of the coordinate axis (the positive half-space of @@ -692,7 +694,9 @@ class YConeOneSided(CompositeSurface): z0 : float, optional z-coordinate of the apex. Defaults to 0. r2 : float, optional - Parameter related to the aperature. Defaults to 1. + Parameter related to the aperture [:math:`\\rm cm^2`]. + It can be interpreted as the increase in the radius squared per cm along + the cone's axis of revolution. up : bool Whether to select the side of the cone that extends to infinity in the positive direction of the coordinate axis (the positive half-space of @@ -744,7 +748,9 @@ class ZConeOneSided(CompositeSurface): z0 : float, optional z-coordinate of the apex. Defaults to 0. r2 : float, optional - Parameter related to the aperature. Defaults to 1. + Parameter related to the aperture [:math:`\\rm cm^2`]. + It can be interpreted as the increase in the radius squared per cm along + the cone's axis of revolution. up : bool Whether to select the side of the cone that extends to infinity in the positive direction of the coordinate axis (the positive half-space of From faddfb15e752ccd69a8f47ff101de377f25c1378 Mon Sep 17 00:00:00 2001 From: "Micah D. Gale" Date: Thu, 7 Mar 2024 15:44:00 -0600 Subject: [PATCH 8/8] Disambiguation about the disambiguation surface. --- openmc/model/surface_composite.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/openmc/model/surface_composite.py b/openmc/model/surface_composite.py index 66e54233523..8f48b2f7117 100644 --- a/openmc/model/surface_composite.py +++ b/openmc/model/surface_composite.py @@ -617,7 +617,7 @@ def __pos__(self): class XConeOneSided(CompositeSurface): """One-sided cone parallel the x-axis - A one-sided cone is composed of a normal cone surface and an "ambiguity" + A one-sided cone is composed of a normal cone surface and a "disambiguation" surface that eliminates the ambiguity as to which region of space is included. This class acts as a proper surface, meaning that unary `+` and `-` operators applied to it will produce a half-space. The negative side is @@ -649,7 +649,7 @@ class XConeOneSided(CompositeSurface): cone : openmc.XCone Regular two-sided cone plane : openmc.XPlane - Ambiguity surface + Disambiguation surface up : bool Whether to select the side of the cone that extends to infinity in the positive direction of the coordinate axis (the positive half-space of @@ -677,7 +677,7 @@ def __pos__(self): class YConeOneSided(CompositeSurface): """One-sided cone parallel the y-axis - A one-sided cone is composed of a normal cone surface and an "ambiguity" + A one-sided cone is composed of a normal cone surface and a "disambiguation" surface that eliminates the ambiguity as to which region of space is included. This class acts as a proper surface, meaning that unary `+` and `-` operators applied to it will produce a half-space. The negative side is @@ -709,7 +709,7 @@ class YConeOneSided(CompositeSurface): cone : openmc.YCone Regular two-sided cone plane : openmc.YPlane - Ambiguity surface + Disambiguation surface up : bool Whether to select the side of the cone that extends to infinity in the positive direction of the coordinate axis (the positive half-space of @@ -731,7 +731,7 @@ def __init__(self, x0=0., y0=0., z0=0., r2=1., up=True, **kwargs): class ZConeOneSided(CompositeSurface): """One-sided cone parallel the z-axis - A one-sided cone is composed of a normal cone surface and an "ambiguity" + A one-sided cone is composed of a normal cone surface and a "disambiguation" surface that eliminates the ambiguity as to which region of space is included. This class acts as a proper surface, meaning that unary `+` and `-` operators applied to it will produce a half-space. The negative side is @@ -763,7 +763,7 @@ class ZConeOneSided(CompositeSurface): cone : openmc.ZCone Regular two-sided cone plane : openmc.ZPlane - Ambiguity surface + Disambiguation surface up : bool Whether to select the side of the cone that extends to infinity in the positive direction of the coordinate axis (the positive half-space of