# Geometry Error using openmc.Quadric

**URL:** <https://openmc.discourse.group/t/geometry-error-using-openmc-quadric/3020>\
**Category:** User Support\
**Created:** [May 21, 2023, 9:59am UTC](https://openmc.discourse.group/t/geometry-error-using-openmc-quadric/3020 "2023-05-21T09:59:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhaozelong](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/zhaozelong/32/1385_2.png) [@zhaozelong](https://openmc.discourse.group/u/zhaozelong)\
**Post date:** [May 21, 2023, 9:59am UTC](https://openmc.discourse.group/t/geometry-error-using-openmc-quadric/3020/1 "2023-05-21T09:59:58Z")

</div>

Hello everyone,  
I ran into a geometric error when I was constructing a second order surface, but I couldn’t solve it. When the second order surface is replaced by the normal standard surface PY, there is no geometric error. This is my python file and Error message.  
[PLA\_ASL.py](https://openmc.discourse.group/uploads/short-url/26OsFoKtzzmCEePUb0RXVDhU9V4.py) (17.9 KB)

 ![ERROR](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/9/9985a4ff78a29b57a2fd1a65711cfe01f75a3639.jpeg)

---

<div class="post-metadata">

**Author:** ![zhaozelong](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/zhaozelong/32/1385_2.png) [@zhaozelong](https://openmc.discourse.group/u/zhaozelong)\
**Post date:** [May 22, 2023, 2:57pm UTC](https://openmc.discourse.group/t/geometry-error-using-openmc-quadric/3020/2 "2023-05-22T14:57:14Z")

</div>

I don’t see a geometric definition error, is it possible that the second order surface function may have a problem when locating particles in OpenMC？

---

<div class="post-metadata">

**Author:** ![zhaozelong](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/zhaozelong/32/1385_2.png) [@zhaozelong](https://openmc.discourse.group/u/zhaozelong)\
**Post date:** [May 23, 2023, 2:24am UTC](https://openmc.discourse.group/t/geometry-error-using-openmc-quadric/3020/3 "2023-05-23T02:24:53Z")

</div>

I did an extreme simple geometry test A using a surface of second order, and it worked without particle leakage. It successed.

 ![OK](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/5/5ea48f615e25794a0741e7cac9e4ed2620c27f56.jpeg)  
 ![PLA_ASL_B](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/0/0eae9d3d44141aa0ac4b6c50fbf43a35cc4217d0.png)  
[PLA\_ASL\_B.py](https://openmc.discourse.group/uploads/short-url/cU5jdcSaKJr5B6HwA8Cfs259JWg.py) (4.1 KB)

---

<div class="post-metadata">

**Author:** ![zhaozelong](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/zhaozelong/32/1385_2.png) [@zhaozelong](https://openmc.discourse.group/u/zhaozelong)\
**Post date:** [May 23, 2023, 2:26am UTC](https://openmc.discourse.group/t/geometry-error-using-openmc-quadric/3020/4 "2023-05-23T02:26:40Z")

</div>

I did an extreme simple geometry test B using a surface of second order, and many particle leakage and can not find the location. It failed.

 ![Error](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/5/5d803aeeb401fd5957e91c6ff49577ea2481f4f3.jpeg)  
 ![PLA_ASL_A](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/8/898587ac9da322135a42bb09ff6e1b3858e822df.png)  
[PLA\_ASL\_B.py](https://openmc.discourse.group/uploads/short-url/cU5jdcSaKJr5B6HwA8Cfs259JWg.py) (4.1 KB)

---

<div class="post-metadata">

**Author:** ![zhaozelong](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/zhaozelong/32/1385_2.png) [@zhaozelong](https://openmc.discourse.group/u/zhaozelong)\
**Post date:** [May 23, 2023, 2:29am UTC](https://openmc.discourse.group/t/geometry-error-using-openmc-quadric/3020/5 "2023-05-23T02:29:19Z")

</div>

The only difference between extreme simple geometric examples A and B is the difference in Quadric second order surface parameters. Does this mean that OpenMC will have geometric positioning problems when dealing with some 2nd order Quadric surfaces?
