Skip to content

Commit

Permalink
SVEA and NuScale models + Bugfixes (#161)
Browse files Browse the repository at this point in the history
* Added a 2D SVEA assembly and 2D NuScale model.
* Fixed Gmsh model IO mapping.
* Added Material.addNuclidesAtomPercent
* Fixed typos and omissions in docs.
* Fixed a unit error in VERA models gap material density
  • Loading branch information
KyleVaughn authored Jul 8, 2024
1 parent 42330aa commit 940145f
Show file tree
Hide file tree
Showing 20 changed files with 2,028 additions and 62 deletions.
2 changes: 1 addition & 1 deletion docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ See the files in ``UM2/scripts/deps`` for more information on spack environments

.. code-block:: bash
spack add pugixml%gcc@12 g++ --version # Expect 12+
g++ --version # Expect 12+
gfortran --version # Expect 12+
cmake --version # Expect 3.25+
find $SPACK_ENV -name libhdf5* # Expect non-empty output
Expand Down
2 changes: 2 additions & 0 deletions docs/source/mpact.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ MPACT requires gcc version 8 and mpich version 3.3 if MPI is to be used.
spack compiler find
spack env create mpact
spack env activate mpact
spack add cmake%[email protected]
spack add [email protected]%[email protected]
spack add hdf5%[email protected] +cxx+fortran~mpi
spack spec
spack install
Now we will begin to install MPACT. We will not cover cloning MPACT, MPACT_Extras, or Futility here.
Expand Down
11 changes: 11 additions & 0 deletions include/um2/gmsh/model.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ groupPreservingIntersect(gmsh::vectorpair const & object_dimtags,
int tag = -1, bool remove_object = true,
bool remove_tool = true);

// A gmsh::model::occ::cut that preserves the model's physical groups
//
// In the event that two overlapping entities have material physical groups, the
// optional material hierarchy is used to choose a single material for the resultant
// overlapping entity/entities.
void
groupPreservingCut(gmsh::vectorpair const & object_dimtags,
gmsh::vectorpair const & tool_dimtags, gmsh::vectorpair & out_dimtags,
std::vector<gmsh::vectorpair> & out_dimtags_map, int tag = -1,
bool remove_object = true, bool remove_tool = true);

//==============================================================================
// Functions for user-level API. These functions should take um2::Vector, um2::String,
// etc. Not std::vector, std::string, etc.
Expand Down
7 changes: 7 additions & 0 deletions include/um2/physics/material.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,16 @@ class Material
void
addNuclide(String const & symbol, Float num_density) noexcept;

void
addNuclideWt(Int zaid, Float wt_percent) noexcept;

void
addNuclideWt(String const & symbol, Float wt_percent) noexcept;

void
addNuclidesAtomPercent(Vector<String> const & symbols,
Vector<Float> const & percents) noexcept;

[[nodiscard]] constexpr auto
hasXSec() const noexcept -> bool
{
Expand Down
2 changes: 2 additions & 0 deletions models/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ include(${PROJECT_SOURCE_DIR}/cmake/um2_add_executable.cmake)
add_subdirectory(./c5g7)
add_subdirectory(./vera)
add_subdirectory(./crocus)
add_subdirectory(./svea)
add_subdirectory(./nuscale)
add_subdirectory(./fnr)
1 change: 1 addition & 0 deletions models/nuscale/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
um2_add_executable(./nuscale_2d.cpp)
Loading

0 comments on commit 940145f

Please sign in to comment.