public class Macrolib extends Operator
Here is an example of a BeanShell script to define a macrolib:
myMacro = new Macrolib("myMacro", 1, 1, 1); // mixture 1: water = new Composition("water", "medium"); myMacro.setTotal(water, new float[] {0.3683f}); myMacro.setScat(water, 0, 1, new float[] {0.3683f}, 1, 1); // mixture 2: fuel = new Composition("fuel", "medium"); myMacro.setTotal(fuel, new float[] {0.36522f}); myMacro.setNuSigf(fuel, new float[] {0.05564f}); myMacro.setChi(fuel, new float[] {1.0f}); myMacro.setScat(fuel, 0, 1, new float[] {0.3234f}, 1, 1); // mixture 3: clad = new Composition("clad", "medium"); myMacro.setTotal(clad1, new float[] {0.8453f}); myMacro.setScat(clad1, 0, 1, new float[] {0.5216f}, 1, 1);
Author: Alain Hebert, Ecole Polytechnique de Montreal (2002)
Modifier and Type | Field and Description |
---|---|
java.lang.String |
ctra
type of transport correction that should be generated and stored on
the embedded LCM structure.
|
float[] |
energy
energy (eV) array which define the limits of the groups
(ngroup+1 elements).
|
boolean |
norm
set to true to specify that the macroscopic scattering cross
sections and the fission spectrum have to be normalized.
|
Constructor and Description |
---|
Macrolib(java.lang.String name,
int ngro,
int nifi,
int nanis)
Use this constructor to create a new Macrolib object.
|
Modifier and Type | Method and Description |
---|---|
void |
exec()
load the embedded lcmObj object with the content of this Macrolib.
|
void |
setChi(Composition medium,
float[] chi)
set the fission spectrum in a medium.
|
void |
setDiff(Composition medium,
float[] diff)
set the isotropic diffusion coefficients in a medium.
|
void |
setFixe(Composition medium,
float[] fixe)
set the fixed sources in a medium.
|
void |
setHFactor(Composition medium,
float[] hFactor)
set the power factors in a medium.
|
void |
setNuSigf(Composition medium,
float[] xs)
set the macroscopic fission cross sections multiplied by the
average number of neutron produced per fission in a medium.
|
void |
setScat(Composition medium,
int nanis,
int jg,
float[] xs,
int njj,
int ijj)
set the Legendre order-ordered scattering information for each secondary
energy group jg.
|
void |
setTotal(Composition medium,
float[] xs)
set the macroscopic total cross sections in a medium.
|
void |
setTranc(Composition medium,
float[] xs)
set the macroscopic transport correction cross sections in a medium.
|
public java.lang.String ctra
public boolean norm
public float[] energy
public Macrolib(java.lang.String name, int ngro, int nifi, int nanis)
name
- user-defined name of the Macrolib objectngro
- number of energy groups for which the macroscopic cross
sections will be provided.nifi
- number of fissile spectrum associated with each mixture.
Each fission spectrum generally represents a fissile isotope.nanis
- maximum level of anisotropy permitted in the scattering
cross sections.public void setTotal(Composition medium, float[] xs) throws JargonException
medium
- Composition object containing an isotopic mixture
used as a reference to hold a set of macroscopic cross sections.xs
- group-dependent cross sectionsJargonException
public void setTranc(Composition medium, float[] xs) throws JargonException
medium
- Composition object containing an isotopic mixture
used as a reference to hold a set of macroscopic cross sections.xs
- group-dependent cross sectionsJargonException
public void setNuSigf(Composition medium, float[] xs) throws JargonException
medium
- Composition object containing an isotopic mixture
used as a reference to hold a set of macroscopic cross sections.xs
- group-dependent cross sectionsJargonException
public void setChi(Composition medium, float[] chi) throws JargonException
medium
- Composition object containing an isotopic mixture
used as a reference to hold a set of macroscopic cross sections.chi
- group-dependent fission spectrumJargonException
public void setFixe(Composition medium, float[] fixe) throws JargonException
medium
- Composition object containing an isotopic mixture
used as a reference to hold a set of macroscopic cross sections.fixe
- group-dependent fixed sourcesJargonException
public void setDiff(Composition medium, float[] diff) throws JargonException
medium
- Composition object containing an isotopic mixture
used as a reference to hold a set of macroscopic cross sections.diff
- group-dependent diffusion coefficientsJargonException
public void setHFactor(Composition medium, float[] hFactor) throws JargonException
medium
- Composition object containing an isotopic mixture
used as a reference to hold a set of macroscopic cross sections.hFactor
- group-dependent power factorsJargonException
public void setScat(Composition medium, int nanis, int jg, float[] xs, int njj, int ijj) throws JargonException
medium
- Composition object containing an isotopic mixture
used as a reference to hold a set of macroscopic cross sections.nanis
- Legendre order (0 for isotropic scattering).jg
- secondary group index (1 for highest energy).xs
- multigroup macroscopic scattering cross section from the
primary group ig towards the secondary group jg
considered for the current mixture and anisotropy level. The elements
are ordered using decreasing primary group index ig, from
ijj to ijj - njj + 1.njj
- number of primary groups ig with non vanishing
macroscopic scattering cross section towards the secondary group
jg.ijj
- group index of the most thermal group with non-vanishing
macroscopic scattering cross section towards the secondary group
jg.JargonException
public void exec() throws JargonException
JargonException