Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
ForceFormulationConfig.hpp File Reference

Configuration for the GSPH momentum equation formulation. More...

#include "shambackends/type_traits.hpp"
#include "shambackends/vec.hpp"
#include "shamsys/legacy/log.hpp"
#include <nlohmann/json.hpp>
#include <variant>
Include dependency graph for ForceFormulationConfig.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  shammodels::gsph::ForceFormulationConfig< Tvec >
struct  shammodels::gsph::ForceFormulationConfig< Tvec >::ChaWhitworth
 Cha & Whitworth (2003) symmetric SPH momentum equation (default). More...
struct  shammodels::gsph::ForceFormulationConfig< Tvec >::InutsukaV2
 Inutsuka (2002) effective volume/face momentum equation. More...

Namespaces

namespace  shammodels
 namespace for models

Functions

template<class Tvec>
void shammodels::gsph::to_json (nlohmann::json &j, const ForceFormulationConfig< Tvec > &p)
template<class Tvec>
void shammodels::gsph::from_json (const nlohmann::json &j, ForceFormulationConfig< Tvec > &p)

Detailed Description

Configuration for the GSPH momentum equation formulation.

Author
Guo Yansong (guo.y.nosp@m.anso.nosp@m.ng.ng.nosp@m.y@gm.nosp@m.ail.c.nosp@m.om)
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)
Yona Lapeyre (yona..nosp@m.lape.nosp@m.yre@e.nosp@m.ns-l.nosp@m.yon.f.nosp@m.r)

GSPH implementations in the literature discretize the momentum equation in more than one way. This selects between:

  • ChaWhitworth: the symmetric SPH form (nabla_W/rho^2/Omega) with p* substituted for pressure, following Cha & Whitworth (2003). This is shamrock's default.
  • InutsukaV2: the effective volume/face form (V2_ij * grad_W_ij) following Inutsuka (2002), reconstructed here with linear (1st order) face interpolation.

Definition in file ForceFormulationConfig.hpp.

Function Documentation

◆ from_json()

template<class Tvec>
void shammodels::gsph::from_json ( const nlohmann::json & j,
ForceFormulationConfig< Tvec > & p )
inline

Definition at line 111 of file ForceFormulationConfig.hpp.

◆ to_json()

template<class Tvec>
void shammodels::gsph::to_json ( nlohmann::json & j,
const ForceFormulationConfig< Tvec > & p )
inline

Definition at line 92 of file ForceFormulationConfig.hpp.