1#ifndef CYCLUS_SRC_MATERIAL_H_
2#define CYCLUS_SRC_MATERIAL_H_
5#include <boost/shared_ptr.hpp>
18const double g =
kg* .001;
19const double mg =
kg* .000001;
20const double ug =
kg* .000000001;
75 typedef boost::shared_ptr<Material>
Ptr;
104 virtual std::string
units()
const;
176 int prev_decay_time_;
178 std::string package_name_;
a holding class for information related to a TradeExecutor
The abstract base class used by all types of agents that live and interact in a simulation.
boost::shared_ptr< Composition > Ptr
A simulation context provides access to necessary simulation-global functions and state.
The material class is primarily responsible for enabling basic material manipulation while helping en...
virtual std::string package_name()
Returns the package id.
virtual Resource::Ptr Clone() const
Creates an untracked copy of this material object.
virtual void Decay(int curr_time=-1)
Updates the material's composition by performing a decay calculation.
Material(Context *ctx, double quantity, Composition::Ptr c, std::string package_name=Package::unpackaged_name())
Ptr ExtractQty(double qty)
Same as ExtractComp with c = this->comp().
static const ResourceType kType
double DecayHeat()
Returns a double with the decay heat of the material in units of W/kg.
virtual void Record(Context *ctx) const
Records the internal nuclide composition of this resource.
virtual Resource::Ptr ExtractRes(double qty)
Splits the resource and returns the extracted portion as a new resource object.
Composition::Ptr comp()
Returns the nuclide composition of this material.
virtual int qual_id() const
Returns the id of the material's internal nuclide composition.
int prev_decay_time()
Returns the last time step on which a decay calculation was performed for the material.
virtual std::string units() const
Returns "kg".
virtual void ChangePackage(std::string new_package_name=Package::unpackaged_name())
Changes the package id.
void Transmute(Composition::Ptr c)
Changes the material's composition to c without changing its mass.
virtual double quantity() const
Returns the mass of this material in kg.
virtual Resource::Ptr PackageExtract(double qty, std::string new_package_name=Package::unpackaged_name())
boost::shared_ptr< Material > Ptr
virtual void Absorb(Ptr mat)
Combines material mat with this one. mat's quantity becomes zero.
static Ptr Create(Agent *creator, double quantity, Composition::Ptr c, std::string package_name=Package::unpackaged_name())
Creates a new material resource that is "live" and tracked.
Ptr ExtractComp(double qty, Composition::Ptr c, double threshold=eps_rsrc())
Creates a new material by extracting from this one.
virtual const ResourceType type() const
Returns Material::kType.
static Ptr CreateUntracked(double quantity, Composition::Ptr c)
Creates a new material resource that does not actually exist as part of the simulation and is untrack...
static std::string unpackaged_name()
Tracks and records the state and parent-child relationships of resources as they are changed.
Resource defines an abstract interface implemented by types that are offered, requested,...
boost::shared_ptr< Resource > Ptr
Handles initialization of a simulation from the output database.
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
double eps_rsrc()
an epsilon value to be used by resources
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters
Material::Ptr NewBlankMaterial(double quantity)
Creates and returns a new material with the specified quantity and a default, meaningless composition...