MURE
Loading...
Searching...
No Matches
List of all members
COBRA_EN Class Reference

Manages the coupling analysis with thermal hydraulics code COBRA-EN. More...

#include <COBRA_EN.hxx>

Public Member Functions

Constructor &destructor
 COBRA_EN (GenericReactorAssembly *GRA)
 Default constructor.
 
virtual ~COBRA_EN ()
 Default destructor.
 
 COBRA_EN ()
 Fictitious constructor ; just used for reset of static bool.
 
virtual COBRA_ENClone ()
 

Protected Member Functions

Input file buiders
void Card1 ()
 Generate and Write : Run Identifier.
 
void Card2 ()
 Generate and Write : General Options.
 
void Card3 ()
 Generate and Write : General TH Parameters.
 
void Card4 ()
 Generate and Write : Axial Intervals.
 
void Card5 ()
 Generate and Write : Linear Rod Powers.
 
void Card7 ()
 Generate and Write : Channel Connexion Data.
 
void Card8 ()
 Generate and Write : Rod To Subchannel Connection Data.
 
void Card10 ()
 Generate and Write : Channel Data.
 
void Card11 ()
 Generate and Write : Grids position.
 
void Card12 ()
 Generate and Write : Data for COBRA Fuel Heating Models.
 
void Card14 ()
 Generate and Write : Hydraulic Model Indicators.
 
void Card18 ()
 Generate and Write : Two Phase Friction Model.
 
void Card20 ()
 Generate and Write : Void Friction Model.
 
void Card22 ()
 Generate and Write : Heat Transfer Model.
 
void Card26 ()
 Generate and Write : Parameters Section A and B.
 
void Card27 ()
 Generate and Write : Convergence Parameters.
 
void Card29 ()
 Generate and Write : Operating Conditions.
 
void Card30 ()
 Generate and Write : Time Data.
 
void Card32 ()
 Generate and Write : Transient Parameters.
 
void Card36 ()
 Generate and Write : Output Printing.
 
Internal methods
 COBRA_EN (const COBRA_EN &c)
 < Copy constructor
 
void Init ()
 Initializes some structures.
 
void THDataCalculations ()
 Calculates values necessary to COBRA code.
 
void MeshGridMC ()
 Create mesh grid correspondance between MURE and COBRA lattices.
 
void CardComment (int N, string Comment)
 Generate and Write comments of cards.
 
string InputCardTruncate (double Value, int CharNumber, bool MustBeADouble=false)
 Truncate value to the correct input size.
 
void CalculatePowerDeposits ()
 Calculate cells' power deposits.
 
void CalculateChannelsPositions ()
 Calculate channels' positions.
 
vector< double > CalculateChannelConnectionAndData (int ChannelNumber)
 Calculate channels connections distances and channels data (area and perimeters)
 
vector< double > IdentifyRodsToSubChannelsConnexion (int RodNumber)
 Calculate Rod to subchannel connection data.
 
void OrganizeChannels ()
 Organize Channels types.
 
void PrintData ()
 Print output files of geometry and power deposits.
 
void PrintNewTHData ()
 Print output files of new operating conditions.
 
void RunCOBRA ()
 Run script for COBRA launching.
 
void CheckRestrictions ()
 Checks coherence on data : some improvments are to be done.
 

COBRA Reader Internal subroutines

GenericReactorAssemblyfReactorAssembly
 
bool fHydraulicModelIndicators
 If true, user hydraulics parameters are used.
 
string fAssemblyName
 Identification Name Of the assembly.
 
int fFuelRodsNumber
 Total number of fuel rods (control rods are including in this numbering but they do not release power)
 
int fChannelsNumber
 Total number of coolant channels (not including bypass channels)
 
int fChannelType
 Number of different channel types.
 
int fNDX
 Number of axials interval in thermal hydraulics.
 
double fInletTemperature
 Inlet temperature (K) default = 560 K.
 
double fInletDensity
 If necessary for plenum : inlet density linked with the temperature.
 
double fInletMassFlux
 Average inlet mass flux (kg/m2/s) default = 3900 kg/m2/s.
 
double fInletBoronConcentration
 Inlet boron concentration (mass proportion in ppm) default = 1000 ppm.
 
double fExitPressure
 System exit pressure (MPa) default = 15.8 MPa.
 
string fDirectory
 MURE output directory.
 
ofstream * fInputFile
 COBRA Input File.
 
ifstream * fOutputFile
 COBRA Output File.
 
int fNumberOfSpacerGrids
 Number of grids.
 
double fSpacerGridCoeff
 Grid loss coefficient.
 
vector< double > fSpacerGridPositions
 Positions of grids.
 
vector< vector< double > > fPower
 Power deposit value for each radial and axial zones.
 
vector< vector< double > > fPowerErr
 Error on power deposit value for each radial and axial zones.
 
vector< vector< int > > fCOBRARodsLatticeNumbering
 Matrix containing rods lattice mesh data for COBRA identification number (MURE->COBRA)
 
vector< vector< int > > fCOBRAChannelsLatticeNumbering
 Matrix containing channels lattice mesh data for COBRA identification number (MURE->COBRA)
 
vector< vector< double > > fCOBRAChannelsRCXPos
 Matrix containing channels top right corner X cartesian position.
 
vector< vector< double > > fCOBRAChannelsRCYPos
 Matrix containing channels top right corner Y cartesian position.
 
vector< vector< double > > fCOBRAChannelsCenterXPos
 Matrix containing channels center X cartesian position.
 
vector< vector< double > > fCOBRAChannelsCenterYPos
 Matrix containing channels center Y cartesian position.
 
vector< vector< int > > fChannelTypes
 Matrix containing channels types with their identification number.
 
vector< double > fChannelFlowArea
 Flow area value of the channel.
 
vector< double > fChannelWettedPerimeter
 Wetted perimeter value of the channel.
 
vector< double > fChannelHeatedPerimeter
 Heated perimeter value of the channel.
 
vector< vector< double > > fMUREFuelCellsTemp
 Matrix containing MURE fuel cells temperature f[X][Y] : X = COBRA rod numbering ; Y = Levels steps (bottom at first)
 
vector< vector< double > > fMURECladCellsTemp
 Matrix containing MURE cladding cells temperature f[X][Y] : X = COBRA rod numbering ; Y = Levels steps (bottom at first)
 
vector< vector< double > > fMURECoolantCellsTemp
 Matrix containing MURE coolant cells temperature f[X][Y] : X = COBRA rod numbering ; Y = Levels steps (bottom at first)
 
vector< vector< double > > fCOBRACoolantChannelDensity
 Temporary Matrix containing COBRA coolant channels temperature f[X][Y] : X = COBRA channel numbering ; Y = Levels steps (bottom at first)
 
vector< vector< double > > fMURECoolantCellsDensity
 Matrix containing MURE coolant cells temperature f[X][Y] : X = COBRA rod numbering ; Y = Levels steps (bottom at first)
 
double fOutletMeanTemperature
 Outlet mean temperature (used for plenum)
 
double fOutletMeanDensity
 Outlet mean density (used for plenum)
 
vector< ofstream * > fFiles
 Output files.
 
static bool fSigmaPhiUpdated = false
 Check if the update of sigma phi is already done.
 
void UpdateData ()
 Run routines to get and update all data.
 
void CheckOutputFile ()
 Checks output file presence (results of thermal hydraulics computation)
 
void ExtractData ()
 Read the output file and store required data into matrix (temperatures, densities, ...)
 
void MCCellsDataAverages ()
 Do an average on thermal data (COBRA mesh —> MURE mesh)
 
void MCZonesDataAverages ()
 Do an average on radial zones thermal data for each axial level (MURE simplified mesh)
 
void RebootStrapping ()
 Re initialize some values (in the case of iterations with neutronics)
 

Miscellaneous methods

void SetInletTemperature (double T)
 
void SetInletMassFlux (double Q)
 
void SetInletBoronConcentration (double C)
 
void SetExitPressure (double P)
 
void BuildCOBRAFile ()
 Build COBRA input file and run COBRA.
 
void SetSpacerGridsCoeff (double GridCoefficient)
 
void AddSpacerGridsPos (double Pos)
 
GenericReactorAssemblyGetReactorAssembly ()
 
void SetInletDensity (double D)
 
void SetUserHydraulicsModel ()
 
static void ResetSigmaPhiBool ()
 

Detailed Description

Manages the coupling analysis with thermal hydraulics code COBRA-EN.

This Object creates the input file of the thermal hydraulic code COBRA-EN. It manages the running and the update of the new temperature and densities into the simulated reactor. This class do not directly creates the geometry. It uses a ReactorAssembly geometry.

Data are in SI (dimensions in meters, power in watts, ...) PTO2NICO=pression are in MPa???

Author
Nico*
Version
2.0

Constructor & Destructor Documentation

◆ COBRA_EN() [1/3]

COBRA_EN::COBRA_EN ( GenericReactorAssembly GRA)

Default constructor.

◆ ~COBRA_EN()

COBRA_EN::~COBRA_EN ( )
virtualdefault

Default destructor.

◆ COBRA_EN() [2/3]

COBRA_EN::COBRA_EN ( )

Fictitious constructor ; just used for reset of static bool.

◆ COBRA_EN() [3/3]

COBRA_EN::COBRA_EN ( const COBRA_EN c)
protected

< Copy constructor

Member Function Documentation

◆ AddSpacerGridsPos()

void COBRA_EN::AddSpacerGridsPos ( double  Pos)
inline

< Add relative spacer grid position (fractional distance up channel : z/H)

◆ BuildCOBRAFile()

void COBRA_EN::BuildCOBRAFile ( )

Build COBRA input file and run COBRA.

◆ CalculateChannelConnectionAndData()

vector< double > COBRA_EN::CalculateChannelConnectionAndData ( int  ChannelNumber)
protected

Calculate channels connections distances and channels data (area and perimeters)

◆ CalculateChannelsPositions()

void COBRA_EN::CalculateChannelsPositions ( )
protected

Calculate channels' positions.

◆ CalculatePowerDeposits()

void COBRA_EN::CalculatePowerDeposits ( )
protected

Calculate cells' power deposits.

◆ Card1()

void COBRA_EN::Card1 ( )
protected

Generate and Write : Run Identifier.

◆ Card10()

void COBRA_EN::Card10 ( )
protected

Generate and Write : Channel Data.

◆ Card11()

void COBRA_EN::Card11 ( )
protected

Generate and Write : Grids position.

◆ Card12()

void COBRA_EN::Card12 ( )
protected

Generate and Write : Data for COBRA Fuel Heating Models.

◆ Card14()

void COBRA_EN::Card14 ( )
protected

Generate and Write : Hydraulic Model Indicators.

◆ Card18()

void COBRA_EN::Card18 ( )
protected

Generate and Write : Two Phase Friction Model.

◆ Card2()

void COBRA_EN::Card2 ( )
protected

Generate and Write : General Options.

◆ Card20()

void COBRA_EN::Card20 ( )
protected

Generate and Write : Void Friction Model.

◆ Card22()

void COBRA_EN::Card22 ( )
protected

Generate and Write : Heat Transfer Model.

◆ Card26()

void COBRA_EN::Card26 ( )
protected

Generate and Write : Parameters Section A and B.

◆ Card27()

void COBRA_EN::Card27 ( )
protected

Generate and Write : Convergence Parameters.

◆ Card29()

void COBRA_EN::Card29 ( )
protected

Generate and Write : Operating Conditions.

◆ Card3()

void COBRA_EN::Card3 ( )
protected

Generate and Write : General TH Parameters.

◆ Card30()

void COBRA_EN::Card30 ( )
protected

Generate and Write : Time Data.

◆ Card32()

void COBRA_EN::Card32 ( )
protected

Generate and Write : Transient Parameters.

◆ Card36()

void COBRA_EN::Card36 ( )
protected

Generate and Write : Output Printing.

◆ Card4()

void COBRA_EN::Card4 ( )
protected

Generate and Write : Axial Intervals.

◆ Card5()

void COBRA_EN::Card5 ( )
protected

Generate and Write : Linear Rod Powers.

◆ Card7()

void COBRA_EN::Card7 ( )
protected

Generate and Write : Channel Connexion Data.

◆ Card8()

void COBRA_EN::Card8 ( )
protected

Generate and Write : Rod To Subchannel Connection Data.

◆ CardComment()

void COBRA_EN::CardComment ( int  N,
string  Comment 
)
protected

Generate and Write comments of cards.

◆ CheckOutputFile()

void COBRA_EN::CheckOutputFile ( )
protected

Checks output file presence (results of thermal hydraulics computation)

◆ CheckRestrictions()

void COBRA_EN::CheckRestrictions ( )
protected

Checks coherence on data : some improvments are to be done.

◆ Clone()

virtual COBRA_EN * COBRA_EN::Clone ( )
inlinevirtual

< Correct way to copy a COBRA_EN object in case of derivation

◆ ExtractData()

void COBRA_EN::ExtractData ( )
protected

Read the output file and store required data into matrix (temperatures, densities, ...)

◆ GetReactorAssembly()

GenericReactorAssembly * COBRA_EN::GetReactorAssembly ( )
inline

< returns the reactor assembly

◆ IdentifyRodsToSubChannelsConnexion()

vector< double > COBRA_EN::IdentifyRodsToSubChannelsConnexion ( int  RodNumber)
protected

Calculate Rod to subchannel connection data.

◆ Init()

void COBRA_EN::Init ( )
protected

Initializes some structures.

◆ InputCardTruncate()

string COBRA_EN::InputCardTruncate ( double  Value,
int  CharNumber,
bool  MustBeADouble = false 
)
protected

Truncate value to the correct input size.

◆ MCCellsDataAverages()

void COBRA_EN::MCCellsDataAverages ( )
protected

Do an average on thermal data (COBRA mesh —> MURE mesh)

◆ MCZonesDataAverages()

void COBRA_EN::MCZonesDataAverages ( )
protected

Do an average on radial zones thermal data for each axial level (MURE simplified mesh)

◆ MeshGridMC()

void COBRA_EN::MeshGridMC ( )
protected

Create mesh grid correspondance between MURE and COBRA lattices.

◆ OrganizeChannels()

void COBRA_EN::OrganizeChannels ( )
protected

Organize Channels types.

◆ PrintData()

void COBRA_EN::PrintData ( )
protected

Print output files of geometry and power deposits.

◆ PrintNewTHData()

void COBRA_EN::PrintNewTHData ( )
protected

Print output files of new operating conditions.

◆ RebootStrapping()

void COBRA_EN::RebootStrapping ( )
protected

Re initialize some values (in the case of iterations with neutronics)

◆ ResetSigmaPhiBool()

static void COBRA_EN::ResetSigmaPhiBool ( )
inlinestatic

◆ RunCOBRA()

void COBRA_EN::RunCOBRA ( )
protected

Run script for COBRA launching.

◆ SetExitPressure()

void COBRA_EN::SetExitPressure ( double  P)
inline

< Set system exit pressure (MPa)

◆ SetInletBoronConcentration()

void COBRA_EN::SetInletBoronConcentration ( double  C)
inline

< Set inlet boron concentration (mass proportion in ppm)

◆ SetInletDensity()

void COBRA_EN::SetInletDensity ( double  D)
inline

Set system inlet density (kg/m3).

This method is used only if plenums have been defined ; else, the inlet density is taken from the first cell density

Parameters
D: the density

◆ SetInletMassFlux()

void COBRA_EN::SetInletMassFlux ( double  Q)
inline

< Set average inlet mass flux for channels (kg/m2/s)

◆ SetInletTemperature()

void COBRA_EN::SetInletTemperature ( double  T)
inline

< Set system inlet temperature (K)

◆ SetSpacerGridsCoeff()

void COBRA_EN::SetSpacerGridsCoeff ( double  GridCoefficient)
inline

< Set spacer grid loss coefficients

◆ SetUserHydraulicsModel()

void COBRA_EN::SetUserHydraulicsModel ( )
inline

< Use special models for heat transfer (use carefully)

◆ THDataCalculations()

void COBRA_EN::THDataCalculations ( )
protected

Calculates values necessary to COBRA code.

◆ UpdateData()

void COBRA_EN::UpdateData ( )
protected

Run routines to get and update all data.

Member Data Documentation

◆ fAssemblyName

string COBRA_EN::fAssemblyName
private

Identification Name Of the assembly.

◆ fChannelFlowArea

vector< double > COBRA_EN::fChannelFlowArea
private

Flow area value of the channel.

◆ fChannelHeatedPerimeter

vector< double > COBRA_EN::fChannelHeatedPerimeter
private

Heated perimeter value of the channel.

◆ fChannelsNumber

int COBRA_EN::fChannelsNumber
private

Total number of coolant channels (not including bypass channels)

◆ fChannelType

int COBRA_EN::fChannelType
private

Number of different channel types.

◆ fChannelTypes

vector< vector < int > > COBRA_EN::fChannelTypes
private

Matrix containing channels types with their identification number.

◆ fChannelWettedPerimeter

vector< double > COBRA_EN::fChannelWettedPerimeter
private

Wetted perimeter value of the channel.

◆ fCOBRAChannelsCenterXPos

vector< vector < double > > COBRA_EN::fCOBRAChannelsCenterXPos
private

Matrix containing channels center X cartesian position.

◆ fCOBRAChannelsCenterYPos

vector< vector < double > > COBRA_EN::fCOBRAChannelsCenterYPos
private

Matrix containing channels center Y cartesian position.

◆ fCOBRAChannelsLatticeNumbering

vector< vector < int > > COBRA_EN::fCOBRAChannelsLatticeNumbering
private

Matrix containing channels lattice mesh data for COBRA identification number (MURE->COBRA)

◆ fCOBRAChannelsRCXPos

vector< vector < double > > COBRA_EN::fCOBRAChannelsRCXPos
private

Matrix containing channels top right corner X cartesian position.

◆ fCOBRAChannelsRCYPos

vector< vector < double > > COBRA_EN::fCOBRAChannelsRCYPos
private

Matrix containing channels top right corner Y cartesian position.

◆ fCOBRACoolantChannelDensity

vector< vector < double > > COBRA_EN::fCOBRACoolantChannelDensity
private

Temporary Matrix containing COBRA coolant channels temperature f[X][Y] : X = COBRA channel numbering ; Y = Levels steps (bottom at first)

◆ fCOBRARodsLatticeNumbering

vector< vector < int > > COBRA_EN::fCOBRARodsLatticeNumbering
private

Matrix containing rods lattice mesh data for COBRA identification number (MURE->COBRA)

◆ fDirectory

string COBRA_EN::fDirectory
private

MURE output directory.

◆ fExitPressure

double COBRA_EN::fExitPressure
private

System exit pressure (MPa) default = 15.8 MPa.

◆ fFiles

vector< ofstream *> COBRA_EN::fFiles
private

Output files.

◆ fFuelRodsNumber

int COBRA_EN::fFuelRodsNumber
private

Total number of fuel rods (control rods are including in this numbering but they do not release power)

◆ fHydraulicModelIndicators

bool COBRA_EN::fHydraulicModelIndicators
private

If true, user hydraulics parameters are used.

◆ fInletBoronConcentration

double COBRA_EN::fInletBoronConcentration
private

Inlet boron concentration (mass proportion in ppm) default = 1000 ppm.

◆ fInletDensity

double COBRA_EN::fInletDensity
private

If necessary for plenum : inlet density linked with the temperature.

◆ fInletMassFlux

double COBRA_EN::fInletMassFlux
private

Average inlet mass flux (kg/m2/s) default = 3900 kg/m2/s.

◆ fInletTemperature

double COBRA_EN::fInletTemperature
private

Inlet temperature (K) default = 560 K.

◆ fInputFile

ofstream* COBRA_EN::fInputFile
private

COBRA Input File.

◆ fMURECladCellsTemp

vector< vector < double > > COBRA_EN::fMURECladCellsTemp
private

Matrix containing MURE cladding cells temperature f[X][Y] : X = COBRA rod numbering ; Y = Levels steps (bottom at first)

◆ fMURECoolantCellsDensity

vector< vector < double > > COBRA_EN::fMURECoolantCellsDensity
private

Matrix containing MURE coolant cells temperature f[X][Y] : X = COBRA rod numbering ; Y = Levels steps (bottom at first)

◆ fMURECoolantCellsTemp

vector< vector < double > > COBRA_EN::fMURECoolantCellsTemp
private

Matrix containing MURE coolant cells temperature f[X][Y] : X = COBRA rod numbering ; Y = Levels steps (bottom at first)

◆ fMUREFuelCellsTemp

vector< vector < double > > COBRA_EN::fMUREFuelCellsTemp
private

Matrix containing MURE fuel cells temperature f[X][Y] : X = COBRA rod numbering ; Y = Levels steps (bottom at first)

◆ fNDX

int COBRA_EN::fNDX
private

Number of axials interval in thermal hydraulics.

◆ fNumberOfSpacerGrids

int COBRA_EN::fNumberOfSpacerGrids
private

Number of grids.

◆ fOutletMeanDensity

double COBRA_EN::fOutletMeanDensity
private

Outlet mean density (used for plenum)

◆ fOutletMeanTemperature

double COBRA_EN::fOutletMeanTemperature
private

Outlet mean temperature (used for plenum)

◆ fOutputFile

ifstream* COBRA_EN::fOutputFile
private

COBRA Output File.

◆ fPower

vector< vector < double > > COBRA_EN::fPower
private

Power deposit value for each radial and axial zones.

◆ fPowerErr

vector< vector < double > > COBRA_EN::fPowerErr
private

Error on power deposit value for each radial and axial zones.

◆ fReactorAssembly

GenericReactorAssembly* COBRA_EN::fReactorAssembly
private

◆ fSigmaPhiUpdated

bool COBRA_EN::fSigmaPhiUpdated = false
staticprivate

Check if the update of sigma phi is already done.

◆ fSpacerGridCoeff

double COBRA_EN::fSpacerGridCoeff
private

Grid loss coefficient.

◆ fSpacerGridPositions

vector< double > COBRA_EN::fSpacerGridPositions
private

Positions of grids.


The documentation for this class was generated from the following files:

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024