MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
ReactorMesh.hxx
Go to the documentation of this file.
1 #ifndef _ReactorMesh_
2 #define _ReactorMesh_
3 
9 #include "MureHeaders.hxx"
10 using namespace std;
11 
12 
14 
29 {
30  public:
37  int NZones=1,
38  int NLevels=1,
39  string AssemblyName="A",
40  bool Hex=false
41  );
42  virtual ReactorMesh* Clone(){return new ReactorMesh(*this);}
43  virtual ~ReactorMesh();
44 
45 
46 
51  void SetExternalShape(
53  Shape_ptr TheShape
54  );
57  Shape_ptr TheShape
58  ) {fSAssemblyZone = TheShape;}
60  void Translate(
61  double dx,
62  double dy,
63  double dz
64  );
66  void SetDimensions(
67  double FuelRadius,
68  double CladThickness,
69  double Pitch,
70  int Zone=-1
71  );
73  void SetSpecialDimensions(
74  double FuelPinRadius,
75  double CladThickness,
76  double Pitch,
77  double R1,
78  int Zone=-1
79  );
81  void SetGTDimensions(
82  double InnerCladRadius,
83  double CladThickness,
84  int Zone=-1
85  );
87  void SetCRDimensions(
88  double InnerCRRadius,
89  double CRCladThickness,
90  double CoolantGapThickness,
91  double CladThickness,
92  int Zone=-1
93  );
96  double dx=0.,
97  double dy=0.
98  ) {fXDeviation+=dx; fYDeviation+=dy;fXCenterDeviationOfMesh=dx;fYCenterDeviationOfMesh=dy;}
100  void SetGasSpaceData(
101  double GasThickness=0,
102  double GasPressure=0,
103  double HeFraMol=0,
104  double XeFraMol=0,
105  int Zone=-1
106  );
108 
109 
114 
125  void AddMaterials(
126  Material *Fuel,
127  Material *Cladding,
128  Material *Coolant,
129  int Zone=-1,
130  int Level=-1
131  );
132  void AddSpecialMaterials(
133  Material *Fuel,
134  Material *Cladding,
135  Material *Coolant,
136  Material *Spec1,
137  int Zone=-1
138  );
139  void AddGTMaterials(
140  Material *GTInside,
141  Material *GTCladding,
142  int Zone=-1
143  );
144  void AddCRMaterials(
145  Material *CRMat,
146  Material *CRCladding,
147  Material *CoolantGap,
148  Material *ExtCladding,
149  int Zone=-1
150  );
152 
153 
158 
163  void AddCircleZoneRadius(
164  double Radius
165  );
167 
172  void AddPinPos(
173  int X,
174  int Y,
175  int Zone
176  );
177 
179 
183  void AddGuideTube(
184  int X,
185  int Y,
186  int Z=-1
187  );
189 
193  void AddControlRod(
194  int X,
195  int Y,
196  int Z=-1
197  );
199 
203  void AddSpecialPin(
204  int X,
205  int Y,
206  int Zone=-1
207  );
209 
216  void ForcedPinCloseToBorder(int PinZoneForItsDimension=-1){fForcedPinCloseToBorder=true;fZoneOfThePinsCloseToBorder=PinZoneForItsDimension;}
226  void CreateGeometry();
228 // void
230 
231 
236 
240  void SetSource(
241  int NPS=5000,
242  int ActivesCycles=100,
243  int InactivesCycles=100
244  );
246  void UpdatePointer();
248  void SetPlenum(double PlenumThickness){fPlenumThickness=PlenumThickness;fIsPlenum=true;}
250  bool IsACOBRAObject(){return fIsCOBRA;}
252  vector<vector<Cell*> > & GetFuelCell(){return fCFuels;}
253 
254 
255 
256  protected:
257 
262  void Copy(const ReactorMesh &m);
265  ReactorMesh(const ReactorMesh &m);
267  void CreateShapes();
269  void CreateCells();
271  void FillSquaredCells();
273  void FillTriangularCells();
275  void CreatePlenum();
277  bool ParTest(int n);
279 
284  int ZoneDiscretization(
285  int i,
286  int j,
287  int k
288  );
290  void Init();
292  void PrintData();
294  void Closing();
296  void InitializeLatticeDiagram();
298  void CreateGuideTubesCells();
300  void CreateControlRodsCells();
302  int CheckFillZoneOfPin(
303  int i,
304  int j,
305  int k,
306  int FillZone
307  );
309 
310 
317  bool fIsHexagon;
318  bool fIsGasSpace;
319  bool fIsPinPos;
323  vector<double> fFuelRadius;
324  vector<double> fCladThickness;
325  vector<double> fGTRadius;
326  vector<double> fGTCladThickness;
327  vector<double> fRadius1;
328  vector<double> fCRRadius;
329  vector<double> fCRCladThickness;
330  vector<double> fCRCoolantGapThickness;
331  vector<double> fCRExtCladThickness;
332  double fPitch;
333  double fChannelHeight;
334  double fAssemblyWidth;
336  double fAssemblySide;
340  double fXDeviation;
341  double fYDeviation;
342  double fZDeviation;
345  vector<double> fGasThickness;
346  double fGasPressure;
347  double fHeFraMol;
348  double fXeFraMol;
349  int fXmin;
350  int fXmax;
351  int fYmin;
352  int fYmax;
353  int fZmin;
354  int fZmax;
355  vector<int> fXpos;
356  vector<int> fYpos;
357  vector<int> fZonepos;
358  vector<int> fGTXpos;
359  vector<int> fGTYpos;
360  vector<int> fGTZpos;
361  vector<int> fCRXpos;
362  vector<int> fCRYpos;
363  vector<int> fCRZpos;
364  vector<bool> fZonesOfGT;
365  vector<bool> fZonesOfCR;
366  vector<int> fSPXpos;
367  vector<int> fSPYpos;
368  vector<int> fZSP;
369  vector<bool> fZonesOfSP;
370  double fXTrans;
371  double fYTrans;
372  double fZTrans;
373 
374 
375 
384  vector<Material*> fMWhole;
386  vector<Cell*> fCWhole;
387  vector<double> fCZR;
395 
396 
397 
405  vector<vector<Material*> > fMFuels;
406  vector<vector<Material*> > fMCladdings;
407  vector<vector<Material*> > fMCoolants;
408  vector<vector<Material*> > fMSpec1;
409  vector<vector<Material*> > fMGTInside;
410  vector<vector<Material*> > fMGTCladdings;
411  vector<vector<Material*> > fMGTOutside;
412  vector<vector<Material*> > fMCRMat;
413  vector<vector<Material*> > fMCRCladding;
414  vector<vector<Material*> > fMCRCoolantGap;
415  vector<vector<Material*> > fMCRExtCladding;
416  vector<vector<Material*> > fMCROutside;
417  vector<Shape_ptr*> fSFuels;
418  vector<Shape_ptr*> fSCladding;
419  vector<Shape_ptr*> fSCoolants;
420  vector<Shape_ptr*> fSSpec1;
421  vector<Shape_ptr*> fSGTInside;
422  vector<Shape_ptr*> fSGTCladdings;
423  vector<Shape_ptr*> fSGTOutside;
424  vector<Shape_ptr*> fSCRMat;
425  vector<Shape_ptr*> fSCRCladding;
426  vector<Shape_ptr*> fSCRCoolantGap;
427  vector<Shape_ptr*> fSCRExtCladding;
428  vector<Shape_ptr*> fSCROutside;
429  vector<vector<Cell*> > fCFuels;
430  vector<vector<Cell*> > fCCladdings;
431  vector<vector<Cell*> > fCCoolants;
432  vector<vector<Cell*> > fCSpec1;
433  vector<vector<Cell*> > fCGTInside;
434  vector<vector<Cell*> > fCGTCladdings;
435  vector<vector<Cell*> > fCGTOutside;
436  vector<vector<Cell*> > fCCRMat;
437  vector<vector<Cell*> > fCCRCladding;
438  vector<vector<Cell*> > fCCRCoolantGap;
439  vector<vector<Cell*> > fCCRExtCladding;
440  vector<vector<Cell*> > fCCROutside;
442 
443 
444 
449  string fAssemblyName;
450  vector<int> fNumberOfPinInZone;
451  vector<int> fNumberOfGTInZone;
452  vector<int> fNumberOfCRInZone;
453  vector<ofstream*> fFiles;
454  vector<vector<vector<int> > > fLatticeZ;
456  bool fIsPlenum;
457  bool fIsCOBRA;
461 
462 
463 
464 };
465 
466 #endif
467 
468 
469 
vector< vector< Cell * > > fCCRExtCladding
Matrix containing CR external cladding cells.
Definition: ReactorMesh.hxx:439
Cell * fCLatticeGen
Lattice mesh generator (cell)
Definition: ReactorMesh.hxx:383
vector< Shape_ptr * > fSCladding
Matrix containing cladding shapes.
Definition: ReactorMesh.hxx:418
vector< double > fCladThickness
The thickness of the cladding of a zone.
Definition: ReactorMesh.hxx:324
bool fIsSpecialPins
Whether there is special pins in the geometry.
Definition: ReactorMesh.hxx:322
vector< Shape_ptr * > fSCRMat
Matrix containing CR shapes.
Definition: ReactorMesh.hxx:424
A Cell is a MCNP cell.
Definition: Cell.hxx:48
double fYDeviation
Y translation of the center pin.
Definition: ReactorMesh.hxx:341
vector< double > fCRCoolantGapThickness
The CR Coolant gap thickness.
Definition: ReactorMesh.hxx:330
vector< int > fNumberOfGTInZone
Number of guide tubes in each zone.
Definition: ReactorMesh.hxx:451
int fZmax
Maximum Z range of lattice.
Definition: ReactorMesh.hxx:354
double fZTrans
Assembly Z translation value.
Definition: ReactorMesh.hxx:372
vector< bool > fZonesOfCR
Zones containing control rods.
Definition: ReactorMesh.hxx:365
vector< vector< Material * > > fMFuels
Matrix containing fuel materials.
Definition: ReactorMesh.hxx:405
double fYTrans
Assembly Y translation value.
Definition: ReactorMesh.hxx:371
vector< vector< Cell * > > fCCROutside
Matrix containing CR outside cells.
Definition: ReactorMesh.hxx:440
vector< double > fCZR
Fictitious circles&#39; radius needed to an automatic defining of cells zones.
Definition: ReactorMesh.hxx:387
vector< bool > fZonesOfGT
Zones containing guide tubes.
Definition: ReactorMesh.hxx:364
vector< Shape_ptr * > fSCRCladding
Matrix containing CR cladding shapes.
Definition: ReactorMesh.hxx:425
bool fInitVectors
Flag used to initialize vectors if necessary (defaut = false)
Definition: ReactorMesh.hxx:441
vector< double > fFuelRadius
The radius of the fuel rod of a zone.
Definition: ReactorMesh.hxx:323
vector< vector< Cell * > > fCCRMat
Matrix containing CR cells.
Definition: ReactorMesh.hxx:436
vector< vector< Material * > > fMCRMat
Matrix containing CR materials.
Definition: ReactorMesh.hxx:412
vector< bool > fZonesOfSP
Zones containing Specials Pins.
Definition: ReactorMesh.hxx:369
vector< double > fCRExtCladThickness
The CR external Cladding thickness.
Definition: ReactorMesh.hxx:331
double fXCenterDeviationOfMesh
Storage of the X translation of the center pin for the mesh inside the assembly.
Definition: ReactorMesh.hxx:343
vector< Shape_ptr * > fSSpec1
Matrix containing special shapes.
Definition: ReactorMesh.hxx:420
bool fIsPinPos
Whether some pin are manually set.
Definition: ReactorMesh.hxx:319
vector< vector< Cell * > > fCSpec1
Matrix containing special cells.
Definition: ReactorMesh.hxx:432
double fZDeviation
Z translation of the center pin.
Definition: ReactorMesh.hxx:342
vector< vector< Cell * > > fCCoolants
Matrix containing coolant cells.
Definition: ReactorMesh.hxx:431
vector< int > fSPYpos
Relative special pin Y position with regard to the center.
Definition: ReactorMesh.hxx:367
int fZmin
Minimum Z range of lattice.
Definition: ReactorMesh.hxx:353
vector< int > fGTYpos
Relative guide tube Y position with regard to the center.
Definition: ReactorMesh.hxx:359
vector< vector< Cell * > > fCFuels
Matrix containing fuel cells.
Definition: ReactorMesh.hxx:429
bool fForcedPinCloseToBorder
True if user force pins closed to the border (lattice hexagonal mesh at the border will be cutted by ...
Definition: ReactorMesh.hxx:459
bool fIsControlRods
Whether there is control rods in the geometry.
Definition: ReactorMesh.hxx:321
vector< vector< Cell * > > fCGTInside
Matrix containing Guide Tubes inside cells.
Definition: ReactorMesh.hxx:433
double fYCenterDeviationOfMesh
Storage of the Y translation of the center pin.
Definition: ReactorMesh.hxx:344
vector< double > fGTCladThickness
The thickness of the guide tube cladding of a zone.
Definition: ReactorMesh.hxx:326
int fRadialZones
The number of radial zones (number of differents cells in x,y direction)
Definition: ReactorMesh.hxx:316
double fXeFraMol
Molar fraction of Xenon in the gas.
Definition: ReactorMesh.hxx:348
vector< vector< Cell * > > fCGTOutside
Matrix containing Guide Tubes outside cells.
Definition: ReactorMesh.hxx:435
Shape_ptr fSAssemblyZone
Assembly shape.
Definition: ReactorMesh.hxx:380
double fXDeviation
X translation of the center pin (instead of begining the mesh on 0,0,0)
Definition: ReactorMesh.hxx:340
double fAssemblyHeight
The assembly height.
Definition: ReactorMesh.hxx:337
vector< vector< Cell * > > fCCRCoolantGap
Matrix containing CR coolant gap cells.
Definition: ReactorMesh.hxx:438
int fYNumberOfPins
Number of pins in Y axis.
Definition: ReactorMesh.hxx:339
bool fIsHexagon
Whether the channel is hexagonal (default is Cuboid)
Definition: ReactorMesh.hxx:317
vector< int > fSPXpos
Relative special pin X position with regard to the center.
Definition: ReactorMesh.hxx:366
vector< Shape_ptr * > fSGTOutside
Matrix containing Guide Tubes outside shapes.
Definition: ReactorMesh.hxx:423
int fAxialLevels
The number of axial levels (number of differents cells in z direction)
Definition: ReactorMesh.hxx:315
void SetCenteredPosition(double dx=0., double dy=0.)
Horizontal deviation of the center of first meshing rod (allows correct geometry without cutted rods ...
Definition: ReactorMesh.hxx:95
bool fIsGuideTubes
Whether there is guide tubes in the geometry.
Definition: ReactorMesh.hxx:320
vector< Shape_ptr * > fSCoolants
Matrix containing coolant shapes.
Definition: ReactorMesh.hxx:419
double fGasPressure
Cold fill gas pressure (Pa)
Definition: ReactorMesh.hxx:346
vector< vector< Material * > > fMGTCladdings
Matrix containing Guide Tubes cladding materials.
Definition: ReactorMesh.hxx:410
vector< vector< Material * > > fMCoolants
Matrix containing coolant materials.
Definition: ReactorMesh.hxx:407
void SetSpecialExternalShape(Shape_ptr TheShape)
Assembly delimitation but with a node (not a simple shape like a brick)
Definition: ReactorMesh.hxx:56
vector< int > fCRZpos
Absolute control rod Z position (first at the bottom)
Definition: ReactorMesh.hxx:363
double fHeFraMol
Molar fraction of Helium in the gas.
Definition: ReactorMesh.hxx:347
Shape_ptr fSLatticeGen
Lattice mesh generator (shape)
Definition: ReactorMesh.hxx:381
vector< Shape_ptr * > fSGTCladdings
Matrix containing Guide Tubes cladding shapes.
Definition: ReactorMesh.hxx:422
vector< vector< Material * > > fMGTInside
Matrix containing Guide Tubes inside materials.
Definition: ReactorMesh.hxx:409
Cell * fCPlenumUp
Top Plenum cell.
Definition: ReactorMesh.hxx:392
double fAssemblyWidth
The assembly width (brick case) X axis.
Definition: ReactorMesh.hxx:334
vector< vector< Material * > > fMCRCladding
Matrix containing CR cladding materials.
Definition: ReactorMesh.hxx:413
File including all headers.
double fAssemblyLength
The assembly length (brick case) Y axis.
Definition: ReactorMesh.hxx:335
vector< vector< Material * > > fMCRCoolantGap
Matrix containing CR coolant gap materials.
Definition: ReactorMesh.hxx:414
vector< Shape_ptr * > fSCROutside
Matrix containing CR outside shapes.
Definition: ReactorMesh.hxx:428
vector< ofstream * > fFiles
Output files.
Definition: ReactorMesh.hxx:453
Shape_ptr * fSWhole
Fictitious channel shape near the border (used only for lattices fill)
Definition: ReactorMesh.hxx:385
int fXmin
Minimum X range of lattice.
Definition: ReactorMesh.hxx:349
vector< int > fCRYpos
Relative control rod Y position with regard to the center.
Definition: ReactorMesh.hxx:362
int fYmax
Maximum Y range of lattice.
Definition: ReactorMesh.hxx:352
Cell * fCAssemblyZone
Assembly cell.
Definition: ReactorMesh.hxx:382
vector< vector< vector< int > > > fLatticeZ
Matrix containing lattice mesh data and the zone of each one.
Definition: ReactorMesh.hxx:454
A Material constituing a Cell.
Definition: Material.hxx:53
vector< Shape_ptr * > fSFuels
Matrix containing fuel shapes.
Definition: ReactorMesh.hxx:417
vector< double > fRadius1
Radius of a rod part of a zone.
Definition: ReactorMesh.hxx:327
double fChannelHeight
The height of the channel (not the reactor height) - Is the same for all.
Definition: ReactorMesh.hxx:333
vector< int > fNumberOfCRInZone
Number of control rods in each zone.
Definition: ReactorMesh.hxx:452
vector< int > fCRXpos
Relative control rod X position with regard to the center.
Definition: ReactorMesh.hxx:361
vector< vector< Material * > > fMCladdings
Matrix containing cladding materials.
Definition: ReactorMesh.hxx:406
vector< Shape_ptr * > fSCRCoolantGap
Matrix containing CR coolant gap shapes.
Definition: ReactorMesh.hxx:426
vector< int > fYpos
Relative pin Y position with regard to the center.
Definition: ReactorMesh.hxx:356
vector< int > fXpos
Relative pin X position with regard to the center.
Definition: ReactorMesh.hxx:355
vector< Shape_ptr * > fSGTInside
Matrix containing Guide Tubes inside shapes.
Definition: ReactorMesh.hxx:421
vector< Material * > fMWhole
Channel material near the border == material of border zone (needed due to lattices fill) ...
Definition: ReactorMesh.hxx:384
double fPitch
The pitch of channels.
Definition: ReactorMesh.hxx:332
string fAssemblyName
Identification name of the assembly.
Definition: ReactorMesh.hxx:449
vector< double > fCRRadius
The CR pin radius.
Definition: ReactorMesh.hxx:328
vector< vector< Material * > > fMGTOutside
Matrix containing Guide Tubes outside materials.
Definition: ReactorMesh.hxx:411
string fExternalShapeType
Type of the external shape.
Definition: ReactorMesh.hxx:455
bool fIsGasSpace
Whether gas space is simulated between cladding and fuel pin.
Definition: ReactorMesh.hxx:318
double fPlenumThickness
Width of the plenum up and down.
Definition: ReactorMesh.hxx:394
Shape_ptr fSPlenumDown
Bottom Plenum shape.
Definition: ReactorMesh.hxx:389
vector< vector< Cell * > > & GetFuelCell()
returns the Fuel (evolving) Cell vector[Nradial][Naxial].
Definition: ReactorMesh.hxx:252
vector< Shape_ptr * > fSCRExtCladding
Matrix containing CR external cladding shapes.
Definition: ReactorMesh.hxx:427
Shape_ptr fSPlenumUp
Top Plenum shape.
Definition: ReactorMesh.hxx:388
int fYmin
Minimum Y range of lattice.
Definition: ReactorMesh.hxx:351
vector< vector< Material * > > fMCROutside
Matrix containing CR outside materials.
Definition: ReactorMesh.hxx:416
int fZoneOfThePinsCloseToBorder
If fuel pins haven&#39;t the same radius, force the zone number of these pins closed to the border to sel...
Definition: ReactorMesh.hxx:460
bool fIsPlenum
True if plenum up and down are needed.
Definition: ReactorMesh.hxx:456
vector< double > fGTRadius
The inner radius of the guide tube rod of a zone or the radius of control rod.
Definition: ReactorMesh.hxx:325
vector< double > fGasThickness
Thickness of the gas space.
Definition: ReactorMesh.hxx:345
vector< Cell * > fCWhole
Fictitious channel cell near the border (used only for lattices fill)
Definition: ReactorMesh.hxx:386
vector< vector< Cell * > > fCCRCladding
Matrix containing CR cladding cells.
Definition: ReactorMesh.hxx:437
int fXmax
Maximum X range of lattice.
Definition: ReactorMesh.hxx:350
void SetPlenum(double PlenumThickness)
Sets plenum at the top and at the bottom - MUST be used BEFORE SetExternalShape() !!!!! ...
Definition: ReactorMesh.hxx:248
vector< int > fGTZpos
Absolute guide tube Z position (first at the bottom)
Definition: ReactorMesh.hxx:360
double fAssemblySide
The length of a hexagon side (hexagon case)
Definition: ReactorMesh.hxx:336
vector< vector< Material * > > fMCRExtCladding
Matrix containing CR external cladding materials.
Definition: ReactorMesh.hxx:415
vector< vector< Material * > > fMSpec1
Matrix containing special materials.
Definition: ReactorMesh.hxx:408
vector< vector< Cell * > > fCGTCladdings
Matrix containing Guide Tubes cladding cells.
Definition: ReactorMesh.hxx:434
vector< bool > fAxialCrushSecurityHeterogeneity
True if an heterogeneity is called - safeguard againt material crushing (one per zone) ...
Definition: ReactorMesh.hxx:458
vector< double > fCRCladThickness
The CR Cladding thickness.
Definition: ReactorMesh.hxx:329
Material * fMPlenumUp
Top Plenum material.
Definition: ReactorMesh.hxx:390
double fXTrans
Assembly X translation value.
Definition: ReactorMesh.hxx:370
vector< int > fNumberOfPinInZone
Number of pins in each zone.
Definition: ReactorMesh.hxx:450
void ForcedPinCloseToBorder(int PinZoneForItsDimension=-1)
Force pins closed to the border for hexagonal lattice geometry.
Definition: ReactorMesh.hxx:216
Cell * fCPlenumDown
Bottom Plenum cell.
Definition: ReactorMesh.hxx:393
vector< int > fGTXpos
Relative guide tube X position with regard to the center.
Definition: ReactorMesh.hxx:358
Manages filled assembly geometry - can be used for a coupled analysis with thermal hydraulics (cf...
Definition: ReactorMesh.hxx:28
vector< int > fZonepos
Zone number of this pin.
Definition: ReactorMesh.hxx:357
vector< int > fZSP
Zones of Specials Pins.
Definition: ReactorMesh.hxx:368
int fXNumberOfPins
Number of pins in X axis.
Definition: ReactorMesh.hxx:338
bool fIsCOBRA
True if COBRA is calling ReactorMesh.
Definition: ReactorMesh.hxx:457
vector< vector< Cell * > > fCCladdings
Matrix containing cladding cells.
Definition: ReactorMesh.hxx:430
virtual ReactorMesh * Clone()
Definition: ReactorMesh.hxx:42
bool IsACOBRAObject()
Test on real type of object.
Definition: ReactorMesh.hxx:250
Material * fMPlenumDown
Bottom Plenum material.
Definition: ReactorMesh.hxx:391

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