https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FCTFdisplacementIC.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "FCTFdisplacementIC.h"
11#include "TriSubChannelMesh.h"
12#include "SCM.h"
13
15
18{
21 "This class calculates the displacement of the duct for the areva FCTF");
22 return params;
23}
24
26 : TriSubChannelBaseIC(params), _subchannel_mesh(SCM::getConstMesh<SubChannelMesh>(_mesh))
27{
28}
29
30Real
32{
33 auto L = _mesh.getHeatedLength();
34 auto LIN = _mesh.getHeatedLengthEntry();
35 auto P = _mesh.getPitch();
36 auto Dmax = 0.001064;
37 auto Side = 0.05291;
39 auto subch_type = _mesh.getSubchannelType(i);
40 auto x = p(0);
41 auto y = p(1);
42 auto z = p(2);
43
44 if (subch_type == EChannelType::EDGE)
45 {
46 if ((y > 2.0 * sqrt(3) * P) && ((LIN + L) >= z) && z >= LIN) // TOP
47 {
48 return ((Dmax / 2.0) * cos(x * pi / (Side / 2.0)) + Dmax / 2) * sin(((z - LIN) / (L)) * pi);
49 }
50 else if ((y < -2.0 * sqrt(3) * P) && ((LIN + L) >= z) && z >= LIN) // BOTTOM
51 {
52 return ((Dmax / 2.0) * cos(x * pi / (Side / 2.0)) + Dmax / 2) * sin(((z - LIN) / (L)) * pi);
53 }
54 else if (y > sqrt(3) * x + sqrt(3) * 4.0 * P && ((LIN + L) >= z) && z >= LIN) // TOP LEFT
55 {
56 auto xprime = x * cos(pi / 3.0) + y * sin(pi / 3.0);
57 return ((Dmax / 2.0) * cos(xprime * pi / (Side / 2.0)) + Dmax / 2) *
58 sin(((z - LIN) / (L)) * pi);
59 }
60 else if (y < -sqrt(3) * x - sqrt(3) * 4.0 * P && ((LIN + L) >= z) && z >= LIN) // BOTTOM LEFT
61 {
62 auto xprime = x * cos(2.0 * pi / 3.0) + y * sin(2.0 * pi / 3.0);
63 return ((Dmax / 2.0) * cos(xprime * pi / (Side / 2.0)) + Dmax / 2) *
64 sin(((z - LIN) / (L)) * pi);
65 }
66 else if (y < sqrt(3) * x - sqrt(3) * 4.0 * P && ((LIN + L) >= z) && z >= LIN) // BOTTOM RIGHT
67 {
68 auto xprime = x * cos(4.0 * pi / 3.0) + y * sin(4.0 * pi / 3.0);
69 return ((Dmax / 2.0) * cos(xprime * pi / (Side / 2.0)) + Dmax / 2) *
70 sin(((z - LIN) / (L)) * pi);
71 }
72 else if (y > -sqrt(3) * x + sqrt(3) * 4.0 * P && ((LIN + L) >= z) && z >= LIN) // TOP RIGHT
73 {
74 auto xprime = x * cos(5.0 * pi / 3.0) + y * sin(5.0 * pi / 3.0);
75 return ((Dmax / 2.0) * cos(xprime * pi / (Side / 2.0)) + Dmax / 2) *
76 sin(((z - LIN) / (L)) * pi);
77 }
78 else
79 {
80 return 0.0;
81 }
82 }
83 else if (subch_type == EChannelType::CORNER)
84 {
85 auto xprime = P + Side / 4.0;
86 return ((Dmax / 2.0) * cos(xprime * pi / (Side / 2.0)) + Dmax / 2) *
87 sin(((z - LIN) / (L)) * pi);
88 }
89 else
90 {
91 return 0.0;
92 }
93}
const std::vector< double > y
const std::vector< double > x
registerMooseObject("SubChannelApp", FCTFdisplacementIC)
const Real p
This class calculates the displacement of the duct for the areva FCTF facility https://www....
FCTFdisplacementIC(const InputParameters &params)
Real value(const Point &p) override
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
Base class for subchannel meshes.
virtual const Real & getHeatedLength() const
Return heated length.
virtual const Real & getHeatedLengthEntry() const
Return unheated length at entry.
virtual const Real & getPitch() const
Return the undeformed pitch between 2 subchannels.
An abstract class for ICs for hexagonal fuel assemblies.
static InputParameters validParams()
const TriSubChannelMesh & _mesh
unsigned int getSubchannelIndexFromPoint(const Point &p) const override
Return a subchannel index for a given physical point p
EChannelType getSubchannelType(unsigned int index) const override
Return the type of the subchannel for given subchannel index.
Definition SCM.h:17