Skip to content

Commit

Permalink
Writing spec for geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethassogba committed Nov 13, 2024
1 parent ed6f06b commit aff516b
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Source general spec

## Directory structure

src/
├── core/
│ ├── foo.h
│ ├── foo.cpp
│ ├── foo.test.cpp
│ ├── bar.h
│ ├── bar.cpp
│ └── bar.test.cpp
└── tests/
├── functional_test1/
└── integration_test1/
1 change: 1 addition & 0 deletions src/core.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "core.hpp"
1 change: 1 addition & 0 deletions src/core.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#pragma once
49 changes: 49 additions & 0 deletions src/core/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Spec

The most effective way of getting early adopters is to be a drop-in replacement for OpenMOC (eventually OpenMC).
This also simplifies the specification of the geometry sub-module.

## Usage example

```python
# Initialize material cross sections using NumPy data arrays
sigma_t = np.array([0.1,0.15,0.2,0.25,0.35,0.4,0.45,0.5])
sigma_f = np.array([0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4])

# Instantiate an OpenMOC Material class object with an optional string name
material = Material(sigma_t, sigma_f, name='test material')

# 4.3% MOX pin cell
mox43 = Cell(rings=3, sectors=8)
mox43.setMaterial(material)
```

## Geometry

Lets the user describe the geometry of the problem.

Cell
PinCell(dx (sca), dy (sca), radii, mats, pitch, pitch)
Lattice(dx (vec), dy (vec))
symetry 1/2 1/8

Point
Edge

## Material and Cross section

Material : store the cross section of a material
vec total or transport sigma_t
vec absorption sigma_a
mat scattering sigma_s
vec fission sigma_f
vec nu*fission v*sigma_f
sca chi
str name (optional)

## Mesh

Utilisee par le solveur pour les calculs. La geometrie est convertie en maillage.

Point
Edge

0 comments on commit aff516b

Please sign in to comment.