SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
scaling.cpp File Reference
#include "serif/utils/laneemden/scaling.hpp"
#include <algorithm>
#include <cmath>
#include <numbers>
Include dependency graph for scaling.cpp:

Namespaces

namespace  serif
 
namespace  serif::utils
 
namespace  serif::utils::laneemden
 

Functions

std::expected< PhysicalScales, std::string > serif::utils::laneemden::scale_from_mass (const Solution &solution, dimensions::QuantityValue< dimensions::Mass > mass, dimensions::QuantityValue< dimensions::MassDensity > central_density, dimensions::QuantityValue< dimensions::GravitationalConstant > gravitational_constant)
 Fix a reference star by mass and central density; its implied K is an output, never a change to an EOS.
 
std::expected< PhysicalScales, std::string > serif::utils::laneemden::scale_from_enthalpy (const Solution &solution, dimensions::QuantityValue< dimensions::SpecificEnthalpy > central_enthalpy, dimensions::QuantityValue< dimensions::MassDensity > central_density, dimensions::QuantityValue< dimensions::GravitationalConstant > gravitational_constant)
 Fix a physical star by central enthalpy and density, including the incompressible n = 0 limit.
 
std::expected< PhysicalScales, std::string > serif::utils::laneemden::scale_from_polytropic_constant (const Solution &solution, double polytropic_constant, dimensions::QuantityValue< dimensions::MassDensity > central_density, dimensions::QuantityValue< dimensions::GravitationalConstant > gravitational_constant)
 Fix a polytropic EOS through its K and central density; n must be strictly positive.
 
std::expected< PhysicalSample, std::string > serif::utils::laneemden::evaluate_physical (const Solution &solution, const PhysicalScales &scales, dimensions::QuantityValue< dimensions::Length > radius)
 Evaluate physical fields, continuing into vacuum beyond the stellar surface.