Add test for quadric surface and fix bug in distance calculation.

Also remove reflective cone, cylinder, and sphere tests since they are covered
in the new test here.
This commit is contained in:
Paul Romano 2015-10-09 15:05:55 +07:00
parent 80b0a1ad25
commit 8fdc5fbba1
19 changed files with 21 additions and 105 deletions

View file

@ -430,7 +430,7 @@ contains
call find_cell(p, found)
if (.not. found) then
call handle_lost_particle(p, "Couldn't find particle after reflecting&
& from surface.")
& from surface " // trim(to_str(surf%id)) // ".")
return
end if

View file

@ -997,7 +997,7 @@ contains
this%E*(v*z + w*y) + this%F*(w*x + u*z) + this%G*u + this%H*v + &
this%J*w))
c = this%A*x*x + this%B*y*y + this%C*z*z + this%D*x*y + this%E*y*z + &
this%F*y*z + this%G*x + this%H*y + this%J*z + K
this%F*x*z + this%G*x + this%H*y + this%J*z + this%K
quad = k*k - a*c
if (quad < ZERO) then

View file

@ -0,0 +1,14 @@
<?xml version="1.0"?>
<geometry>
<surface id="1" type="sphere" coeffs="0. 0. 5. 5." boundary="reflective" />
<surface id="2" type="quadric" coeffs="1. 1. 1. 0. 0. 0. 0. 0. 0. -81." boundary="reflective" />
<surface id="3" type="z-plane" coeffs="5." />
<surface id="4" type="z-cylinder" coeffs="0. 0. 5." boundary="reflective" />
<surface id="5" type="z-cone" coeffs="0. 0. -10. 1." boundary="reflective" />
<surface id="6" type="plane" coeffs="0.2 0.2 1.0 -8." boundary="reflective" />
<cell id="1" material="1" region="-1 -2 3" />
<cell id="2" material="1" region="-3 -4 -5 6" />
</geometry>

View file

@ -3,7 +3,8 @@
<material id="1">
<density value="4.5" units="g/cc" />
<nuclide name="U-235" xs="71c" ao="1.0" />
<nuclide name="U-238" xs="71c" ao="1.0" />
<nuclide name="U-235" xs="71c" ao="0.06" />
</material>
</materials>

View file

@ -0,0 +1,2 @@
k-combined:
9.706301E-01 4.351374E-02

View file

@ -8,7 +8,7 @@
</eigenvalue>
<source>
<space type="point" parameters="0 0 -5" />
<space type="point" parameters="0. 0. 0." />
</source>
</settings>

View file

@ -1,7 +0,0 @@
<?xml version="1.0"?>
<geometry>
<surface id="1" type="z-cone" coeffs="0 0 0 5" boundary="reflective"/>
<cell id="1" material="1" region="-1" />
</geometry>

View file

@ -1,9 +0,0 @@
<?xml version="1.0"?>
<materials>
<material id="1">
<density value="4.5" units="g/cc" />
<nuclide name="U-235" xs="71c" ao="1.0" />
</material>
</materials>

View file

@ -1,2 +0,0 @@
k-combined:
2.269987E+00 4.469683E-03

View file

@ -1,8 +0,0 @@
<?xml version="1.0"?>
<geometry>
<!-- cylinder with radius 10 -->
<surface id="1" type="z-cylinder" coeffs="0 0 10" boundary="reflective"/>
<cell id="1" material="1" region="-1" />
</geometry>

View file

@ -1,9 +0,0 @@
<?xml version="1.0"?>
<materials>
<material id="1">
<density value="4.5" units="g/cc" />
<nuclide name="U-235" xs="71c" ao="1.0" />
</material>
</materials>

View file

@ -1,2 +0,0 @@
k-combined:
2.272436E+00 7.831006E-04

View file

@ -1,16 +0,0 @@
<?xml version="1.0"?>
<settings>
<eigenvalue>
<batches>10</batches>
<inactive>5</inactive>
<particles>1000</particles>
</eigenvalue>
<source>
<space type="box">
<parameters>-4 -4 -4 4 4 4</parameters>
</space>
</source>
</settings>

View file

@ -1,11 +0,0 @@
#!/usr/bin/env python
import os
import sys
sys.path.insert(0, os.pardir)
from testing_harness import TestHarness
if __name__ == '__main__':
harness = TestHarness('statepoint.10.*')
harness.main()

View file

@ -1,8 +0,0 @@
<?xml version="1.0"?>
<geometry>
<!-- Sphere with radius 10 -->
<surface id="1" type="sphere" coeffs="0 0 0 10" boundary="reflective"/>
<cell id="1" material="1" region="-1" />
</geometry>

View file

@ -1,2 +0,0 @@
k-combined:
2.271012E+00 3.466351E-03

View file

@ -1,16 +0,0 @@
<?xml version="1.0"?>
<settings>
<eigenvalue>
<batches>10</batches>
<inactive>5</inactive>
<particles>1000</particles>
</eigenvalue>
<source>
<space type="box">
<parameters>-4 -4 -4 4 4 4</parameters>
</space>
</source>
</settings>

View file

@ -1,11 +0,0 @@
#!/usr/bin/env python
import os
import sys
sys.path.insert(0, os.pardir)
from testing_harness import TestHarness
if __name__ == '__main__':
harness = TestHarness('statepoint.10.*')
harness.main()