MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
COBRA.hxx
Go to the documentation of this file.
1 #ifndef _COBRA_
2 #define _COBRA_
3 
9 #include "MureHeaders.hxx"
10 using namespace std;
11 
12 
14 
28 class COBRA : public ReactorMesh
29 {
30  public:
35  COBRA(
37  int NZones,
38  int NLevels,
39  string AssemblyName="A",
40  bool Hex=false
41  );
42  virtual ~COBRA();
43  COBRA();
44  virtual COBRA* Clone(){return new COBRA(*this);}
45 
46 
51  void SetInletTemperature(double T) {fInletTemperature=T;}
52  void SetInletMassFlux(double Q) {fInletMassFlux=Q;}
53  void SetInletBoronConcentration(double C) {fInletBoronConcentration=C;}
54  void SetExitPressure(double P) {fExitPressure=P;}
55  void BuildCOBRAFile();
56  void SetGridsCoeff(double GridCoefficient) {fGridCoeff=GridCoefficient;}
57  void SetGridsPos(double Pos) {fGridPositions.push_back(Pos);}
58  static void ResetSigmaPhiBool(){fSigmaPhiUpdated=false;}
59  string GetAssemblyName() {return fAssemblyName;}
60  void SetInletDensity(double D) {fInletDensity=D;}
61  void SetUserHydraulicsModel() {fHydraulicModelIndicators=true;}
62 
63 
64  protected:
65 
70  void Card1();
71  void Card2();
72  void Card3();
73  void Card4();
74  void Card5();
75  void Card7();
76  void Card8();
77  void Card10();
78  void Card11();
79  void Card12();
80  void Card14();
81  void Card18();
82  void Card20();
83  void Card22();
84  void Card26();
85  void Card27();
86  void Card29();
87  void Card30();
88  void Card32();
89  void Card36();
90 
91 
92 
97  COBRA(const COBRA &c);
100  void Init();
102  void THDataCalculations();
104  void MeshGridMC();
106  void CardComment(int N,string Comment);
108  string InputCardTruncate(double Value,int CharNumber,bool MustBeADouble=false);
110  void CalculatePowerDeposits();
112  void CalculateChannelsPositions();
114  vector<double> CalculateChannelConnectionAndData(int ChannelNumber);
116  vector<double> IdentifyRodsToSubChannelsConnexion(int RodNumber);
118  void OrganizeChannels();
120  void PrintData();
122  void PrintNewTHData();
124  void RunCOBRA();
126  void CheckCoherence();
128 
129 
134  void UpdateData();
137  void CheckOutputFile();
139  void ExtractData();
141  void MCNPCellsDataAverages();
143  void MCNPZonesDataAverages();
145  void RebootStrapping();
147 
148 
149 
150  private:
151 
152  static bool fSigmaPhiUpdated;
154  string fAssemblyName;
158  int fNDX;
160  double fInletDensity;
161  double fInletMassFlux;
163  double fExitPressure;
164  string fDirectory;
165  ofstream* fInputFile;
166  ifstream* fOutputFile;
168  double fGridCoeff;
169  vector<double> fGridPositions;
170  vector<vector<double> > fPower;
171  vector<vector<double> > fPowerErr;
172  vector<vector<int> > fCOBRARodsLatticeNumbering;
173  vector<vector<int> > fCOBRAChannelsLatticeNumbering;
174  vector<vector<double> > fCOBRAChannelsRCXPos;
175  vector<vector<double> > fCOBRAChannelsRCYPos;
176  vector<vector<double> > fCOBRAChannelsCenterXPos;
177  vector<vector<double> > fCOBRAChannelsCenterYPos;
178  vector<vector<int> > fChannelTypes;
179  vector<double> fChannelFlowArea;
180  vector<double> fChannelWettedPerimeter;
181  vector<double> fChannelHeatedPerimeter;
182 
183  vector<vector<double> > fMUREFuelCellsTemp;
184  vector<vector<double> > fMURECladCellsTemp;
185  vector<vector<double> > fMURECoolantCellsTemp;
186  vector<vector<double> > fCOBRACoolantChannelDensity;
187  vector<vector<double> > fMURECoolantCellsDensity;
188 
191 };
192 
193 #endif
194 
void SetInletDensity(double D)
Set system inlet density (kg/m3) - used only to plenum IF necessary. If it is not used...
Definition: COBRA.hxx:60
double fExitPressure
System exit pressure (MPa) default = 15.8 MPa.
Definition: COBRA.hxx:163
static bool fSigmaPhiUpdated
Check if the update of sigma phi is already done.
Definition: COBRA.hxx:152
int fNDX
Number of axials interval in thermal hydraulics.
Definition: COBRA.hxx:158
double fOutletMeanTemperature
Outlet mean temperature (used for plenum)
Definition: COBRA.hxx:189
vector< vector< double > > fCOBRAChannelsRCXPos
Matrix containing channels top right corner X cartesian position.
Definition: COBRA.hxx:174
static void ResetSigmaPhiBool()
Definition: COBRA.hxx:58
double fOutletMeanDensity
Outlet mean density (used for plenum)
Definition: COBRA.hxx:190
string GetAssemblyName()
returns the name of the assembly
Definition: COBRA.hxx:59
int fChannelType
Number of different channel types.
Definition: COBRA.hxx:157
double fInletBoronConcentration
Inlet boron concentration (mass proportion in ppm) default = 1000 ppm.
Definition: COBRA.hxx:162
int fFuelRodsNumber
Total number of fuel rods (control rods are including in this numbering but they do not release power...
Definition: COBRA.hxx:155
int fChannelsNumber
Total number of coolant channels (not including bypass channels)
Definition: COBRA.hxx:156
double fInletTemperature
Inlet temperature (K) default = 560 K.
Definition: COBRA.hxx:159
vector< vector< int > > fCOBRAChannelsLatticeNumbering
Matrix containing channels lattice mesh data for COBRA identification number (MURE-&gt;COBRA) ...
Definition: COBRA.hxx:173
vector< vector< double > > fMURECladCellsTemp
Matrix containing MURE cladding cells temperature f[X][Y] : X = COBRA rod numbering ; Y = Levels step...
Definition: COBRA.hxx:184
vector< vector< double > > fCOBRAChannelsCenterXPos
Matrix containing channels center X cartesian position.
Definition: COBRA.hxx:176
void SetGridsPos(double Pos)
Set relative grid position (fractional distance up channel : z/H)
Definition: COBRA.hxx:57
vector< vector< double > > fMURECoolantCellsTemp
Matrix containing MURE coolant cells temperature f[X][Y] : X = COBRA rod numbering ; Y = Levels steps...
Definition: COBRA.hxx:185
vector< vector< double > > fCOBRACoolantChannelDensity
Temporary Matrix containing COBRA coolant channels temperature f[X][Y] : X = COBRA channel numbering ...
Definition: COBRA.hxx:186
Manages the coupling analysis with thermal hydraulics code COBRA-EN.
Definition: COBRA.hxx:28
bool fHydraulicModelIndicators
If true, user hydraulics parameters are used.
Definition: COBRA.hxx:153
void SetInletTemperature(double T)
Set system inlet temperature (K)
Definition: COBRA.hxx:51
double fInletDensity
If necessary for plenum : inlet density linked with the temperature.
Definition: COBRA.hxx:160
vector< vector< double > > fPower
Power deposit value for each radial and axial zones.
Definition: COBRA.hxx:170
void SetUserHydraulicsModel()
Use special models for heat transfer (use carefully)
Definition: COBRA.hxx:61
vector< vector< double > > fCOBRAChannelsCenterYPos
Matrix containing channels center Y cartesian position.
Definition: COBRA.hxx:177
void SetInletMassFlux(double Q)
Set average inlet mass flux for channels (kg/m2/s)
Definition: COBRA.hxx:52
double fGridCoeff
Grid loss coefficient.
Definition: COBRA.hxx:168
ifstream * fOutputFile
COBRA Output File.
Definition: COBRA.hxx:166
vector< vector< double > > fPowerErr
Error on power deposit value for each radial and axial zones.
Definition: COBRA.hxx:171
File including all headers.
string fDirectory
MURE output directory.
Definition: COBRA.hxx:164
vector< double > fChannelWettedPerimeter
Wetted perimeter value of the channel.
Definition: COBRA.hxx:180
vector< double > fChannelHeatedPerimeter
Heated perimeter value of the channel.
Definition: COBRA.hxx:181
vector< double > fGridPositions
Positions of grids.
Definition: COBRA.hxx:169
vector< double > fChannelFlowArea
Flow area value of the channel.
Definition: COBRA.hxx:179
vector< vector< int > > fCOBRARodsLatticeNumbering
Matrix containing rods lattice mesh data for COBRA identification number (MURE-&gt;COBRA) ...
Definition: COBRA.hxx:172
vector< vector< double > > fMUREFuelCellsTemp
Matrix containing MURE fuel cells temperature f[X][Y] : X = COBRA rod numbering ; Y = Levels steps (b...
Definition: COBRA.hxx:183
double fInletMassFlux
Average inlet mass flux (kg/m2/s) default = 3900 kg/m2/s.
Definition: COBRA.hxx:161
void SetInletBoronConcentration(double C)
Set inlet boron concentration (mass proportion in ppm)
Definition: COBRA.hxx:53
string fAssemblyName
Identification Name Of the assembly.
Definition: COBRA.hxx:154
void SetGridsCoeff(double GridCoefficient)
Set grid loss coefficients.
Definition: COBRA.hxx:56
virtual COBRA * Clone()
Correct way to copy a COBRA object in case of derivation.
Definition: COBRA.hxx:44
int fNumberOfGrids
Number of grids.
Definition: COBRA.hxx:167
void SetExitPressure(double P)
Set system exit pressure (MPa)
Definition: COBRA.hxx:54
vector< vector< int > > fChannelTypes
Matrix containing channels types with their identification number.
Definition: COBRA.hxx:178
Manages filled assembly geometry - can be used for a coupled analysis with thermal hydraulics (cf...
Definition: ReactorMesh.hxx:28
ofstream * fInputFile
COBRA Input File.
Definition: COBRA.hxx:165
vector< vector< double > > fMURECoolantCellsDensity
Matrix containing MURE coolant cells temperature f[X][Y] : X = COBRA rod numbering ; Y = Levels steps...
Definition: COBRA.hxx:187
vector< vector< double > > fCOBRAChannelsRCYPos
Matrix containing channels top right corner Y cartesian position.
Definition: COBRA.hxx:175

MURE Project, documentation generated by Doxygen 1.8.5 - Mon Nov 17 2014