CYCLUS
|
The material class is primarily responsible for enabling basic material manipulation while helping enforce mass conservation.
It also provides the ability to easily decay a material up to the current simulation time; it does not perform any decay related logic itself.
There are four basic operations that can be performed on materials: create, transmute (change material composition - e.g. fission by reactor), absorb (combine materials), extract (split a material). All material handling/manipulation will be performed using these operations - and all operations performed will be tracked and recorded. Usage examples:
A mining facility that "creates" new material
A conversion facility mixing uranium and flourine:
A reactor transmuting fuel:
A separations plant extracting stuff from spent fuel:
Definition at line 71 of file material.h.
#include <material.h>
Public Types | |
typedef boost::shared_ptr< Material > | Ptr |
Public Types inherited from cyclus::Resource | |
typedef boost::shared_ptr< Resource > | Ptr |
Static Public Member Functions | |
static Ptr | Create (Agent *creator, double quantity, Composition::Ptr c, std::string package_name=Package::unpackaged_name()) |
static Ptr | CreateUntracked (double quantity, Composition::Ptr c) |
Static Public Attributes | |
static const ResourceType | kType = "Material" |
Protected Member Functions | |
Material (Context *ctx, double quantity, Composition::Ptr c, std::string package_name=Package::unpackaged_name()) | |
typedef boost::shared_ptr<Material> cyclus::Material::Ptr |
Definition at line 75 of file material.h.
|
virtual |
Definition at line 15 of file material.cc.
|
protected |
Definition at line 263 of file material.cc.
|
virtual |
Combines material mat with this one. mat's quantity becomes zero.
Definition at line 101 of file material.cc.
|
virtual |
Changes the package id.
Checks that the resource fits the package type minimum and maximum mass criteria.
Reimplemented from cyclus::Resource.
Definition at line 164 of file material.cc.
|
virtual |
Creates an untracked copy of this material object.
Implements cyclus::Resource.
Definition at line 38 of file material.cc.
Composition::Ptr cyclus::Material::comp | ( | ) |
Returns the nuclide composition of this material.
Definition at line 256 of file material.cc.
Composition::Ptr cyclus::Material::comp | ( | ) | const |
DEPRECATED - use non-const comp() function.
Definition at line 251 of file material.cc.
|
static |
Creates a new material resource that is "live" and tracked.
creator is a pointer to the agent creating the resource (usually will be the caller's "this" pointer). All future output data recorded will be done using the creator's context.
Definition at line 17 of file material.cc.
|
static |
Creates a new material resource that does not actually exist as part of the simulation and is untracked.
Definition at line 24 of file material.cc.
Updates the material's composition by performing a decay calculation.
This is a special case of Transmute where the new composition is calculated automatically. The time delta is calculated as the difference between curr_time and the last time the material's composition was updated with a decay calculation (i.e. prev_decay_time). This may or may not result in an updated material composition. Does nothing if the simulation decay mode is set to "never" or none of the nuclides' decay constants are significant with respect to the time delta.
curr_time | current time to use for the decay calculation (default: -1 forces the decay to the context's current time) |
Reimplemented from cyclus::Resource.
Definition at line 186 of file material.cc.
double cyclus::Material::DecayHeat | ( | ) |
Returns a double with the decay heat of the material in units of W/kg.
Definition at line 238 of file material.cc.
Material::Ptr cyclus::Material::ExtractComp | ( | double | qty, |
Composition::Ptr | c, | ||
double | threshold = eps_rsrc() ) |
Creates a new material by extracting from this one.
qty | the mass quantity to extract |
c | the composition the extracted/returned material |
threshold | an absolute mass cutoff below which constituent nuclide quantities of the remaining unextracted material are set to zero. |
Definition at line 72 of file material.cc.
Material::Ptr cyclus::Material::ExtractQty | ( | double | qty | ) |
Same as ExtractComp with c = this->comp().
Definition at line 68 of file material.cc.
|
virtual |
Splits the resource and returns the extracted portion as a new resource object.
Allows for things like ResBuf and Traders to split offers/requests of arbitrary resource implementation type.
Implements cyclus::Resource.
Definition at line 64 of file material.cc.
|
virtual |
Returns the package id.
Reimplemented from cyclus::Resource.
Definition at line 282 of file material.cc.
|
virtual |
Implements cyclus::Resource.
Definition at line 143 of file material.cc.
|
inline |
Returns the last time step on which a decay calculation was performed for the material.
This is not necessarily synonymous with the last time step the material's Decay function was called.
Definition at line 147 of file material.h.
|
virtual |
Returns the id of the material's internal nuclide composition.
Implements cyclus::Resource.
Definition at line 30 of file material.cc.
|
virtual |
Returns the mass of this material in kg.
Implements cyclus::Resource.
Definition at line 60 of file material.cc.
Records the internal nuclide composition of this resource.
Implements cyclus::Resource.
Definition at line 45 of file material.cc.
void cyclus::Material::Transmute | ( | Composition::Ptr | c | ) |
Changes the material's composition to c without changing its mass.
Use this method for things like converting fresh to spent fuel via burning in a reactor.
Definition at line 127 of file material.cc.
|
virtual |
|
virtual |
|
static |
Definition at line 76 of file material.h.