Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ jobs:
shell: bash
run: |
module load opensn/clang/17 python3/3.12.3
cd OpenSn_Logo_CAD && mpirun -np 8 ../opensn/build/python/opensn -i opensn.py
cd OpenSn_Logo_CAD && mpirun -np 8 ../opensn/build/python/opensn -i opensn.py && cd ..
cd Urban_Source && mpirun -np 16 ../opensn/build/python/opensn -i urban_source.py
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ A short description of each applicaiton/example is given below:

- **OpenSn_Logo_CAD**
3D fixed-source problem with a source region in the shape of the OpenSn logo
- **Urban_Source**
3D fixed-source problem that models a source in an urban setting
27 changes: 27 additions & 0 deletions Urban_Source/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## OpenSn Urban Source Example

This example is a 3D, fixed-source problem with one energy group. The problem models an urban setting
with a random number of concrete buldings of various size and shape. A single source is placed in a
random location outside a building. The entire model is enclosed in a block of air. The OpenSCAD
script will generate a new random building/source layout every time it is executed.

The example illustrates a complete CAD-to-OpenSn workflow:

1. The base model is created in OpenSCAD ([urban_source.scad](./urban_source.scad))
2. OpenSCAD exports the model as a CSG file ([urban_source.csg](./urban_source.csg))
3. The CSG file is imported into FreeCAD and exported to a STEP File (urban_source.step)
4. The STEP file is meshed using Gmsh ([urban_source.geo](./urban_source.geo)) and the resulting
`.msh` file can be read directly by OpenSn

The Python OpenSn input file for this example can be found here: [opensn.py](./opensn.py).

<figure>
<img src="urban_source_cad.png" alt="CAD Model" width="600"/>
<figcaption>CAD Model</figcaption>
<br>
<img src="urban_source_grid.png" alt="OpenSn with grid" width="600"/>
<figcaption>OpenSn Results with Grid</figcaption>
<br>
<img src="urban_source_nogrid.png" alt="OpenSn without grid" width="600"/>
<figcaption>OpenSn Results without Grid</figcaption>
</figure>
Loading