oomph::PseudoBucklingRing Class Reference

#include <pseudo_buckling_ring.h>

+ Inheritance diagram for oomph::PseudoBucklingRing:

Public Member Functions

 PseudoBucklingRing ()
 Default constructor (empty and broken) More...
 
 PseudoBucklingRing (const Vector< Data * > &geom_data_pt, TimeStepper *time_stepper_pt)
 
 PseudoBucklingRing (const double &eps_buckl, const double &ampl_ratio, const unsigned n_buckl, const double &r_0, const double &T, TimeStepper *time_stepper_pt)
 
 PseudoBucklingRing (const double &eps_buckl, const double &HoR, const unsigned &n_buckl, const unsigned &imode, TimeStepper *time_stepper_pt)
 
 PseudoBucklingRing (const PseudoBucklingRing &node)=delete
 Broken copy constructor. More...
 
void operator= (const PseudoBucklingRing &)=delete
 Broken assignment operator. More...
 
 ~PseudoBucklingRing ()
 Destructor: Clean up if necessary. More...
 
double eps_buckl ()
 Access function for buckling amplitude. More...
 
double ampl_ratio ()
 Access function for amplitude ratio. More...
 
double r_0 ()
 Access function for undeformed radius. More...
 
double T ()
 Access function for period of oscillation. More...
 
double n_buckl_float ()
 Access function for buckling wavenumber (as float) More...
 
void set_eps_buckl (const double &eps_buckl)
 Set buckling amplitude. More...
 
void set_ampl_ratio (const double &ampl_ratio)
 
void set_n_buckl (const unsigned &n_buckl)
 Set buckling wavenumber. More...
 
void set_R_0 (const double &r_0)
 Set undeformed radius of ring. More...
 
void set_T (const double &T)
 Set period of oscillation. More...
 
void position (const Vector< double > &zeta, Vector< double > &r) const
 
void veloc (const Vector< double > &zeta, Vector< double > &veloc)
 
void accel (const Vector< double > &zeta, Vector< double > &accel)
 
void position (const unsigned &t, const Vector< double > &zeta, Vector< double > &r) const
 
void dposition_dt (const Vector< double > &zeta, const unsigned &j, Vector< double > &drdt)
 
unsigned ngeom_data () const
 How many items of Data does the shape of the object depend on? More...
 
Datageom_data_pt (const unsigned &j)
 
- Public Member Functions inherited from oomph::GeomObject
 GeomObject ()
 Default constructor. More...
 
 GeomObject (const unsigned &ndim)
 
 GeomObject (const unsigned &nlagrangian, const unsigned &ndim)
 
 GeomObject (const unsigned &nlagrangian, const unsigned &ndim, TimeStepper *time_stepper_pt)
 
 GeomObject (const GeomObject &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const GeomObject &)=delete
 Broken assignment operator. More...
 
virtual ~GeomObject ()
 (Empty) destructor More...
 
unsigned nlagrangian () const
 Access function to # of Lagrangian coordinates. More...
 
unsigned ndim () const
 Access function to # of Eulerian coordinates. More...
 
void set_nlagrangian_and_ndim (const unsigned &n_lagrangian, const unsigned &n_dim)
 Set # of Lagrangian and Eulerian coordinates. More...
 
TimeStepper *& time_stepper_pt ()
 
TimeSteppertime_stepper_pt () const
 
virtual void position (const double &t, const Vector< double > &zeta, Vector< double > &r) const
 
virtual void dposition (const Vector< double > &zeta, DenseMatrix< double > &drdzeta) const
 
virtual void d2position (const Vector< double > &zeta, RankThreeTensor< double > &ddrdzeta) const
 
virtual void d2position (const Vector< double > &zeta, Vector< double > &r, DenseMatrix< double > &drdzeta, RankThreeTensor< double > &ddrdzeta) const
 
virtual void locate_zeta (const Vector< double > &zeta, GeomObject *&sub_geom_object_pt, Vector< double > &s, const bool &use_coordinate_as_initial_guess=false)
 
virtual void interpolated_zeta (const Vector< double > &s, Vector< double > &zeta) const
 

Protected Attributes

Vector< Data * > Geom_data_pt
 Vector of pointers to Data items that affects the object's shape. More...
 
bool Must_clean_up
 Do I need to clean up? More...
 
- Protected Attributes inherited from oomph::GeomObject
unsigned NLagrangian
 Number of Lagrangian (intrinsic) coordinates. More...
 
unsigned Ndim
 Number of Eulerian coordinates. More...
 
TimeStepperGeom_object_time_stepper_pt
 

Detailed Description

Pseudo buckling ring: Circular ring deformed by the N-th buckling mode of a thin-wall elastic ring.

\[ x = R_0 \cos(\zeta) + \epsilon \left( \cos(N \zeta) \cos(\zeta) - A \sin(N \zeta) \sin(\zeta) \right) sin(2 \pi t/T) \]

\[ y = R_0 \sin(\zeta) + \epsilon \left( \cos(N \zeta) \sin(\zeta) + A \sin(N \zeta) \cos(\zeta) \right) sin(2 \pi t/T) \]

where A is the ratio of the aziumuthal to the radial buckling amplitude (A=-1/N for statically buckling rings) and epsilon is the buckling amplitude.

Constructor & Destructor Documentation

◆ PseudoBucklingRing() [1/5]

oomph::PseudoBucklingRing::PseudoBucklingRing ( )
inline

Default constructor (empty and broken)

60  {
61  throw OomphLibError(
62  "Don't call empty constructor for PseudoBucklingRing!",
65  }
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ PseudoBucklingRing() [2/5]

oomph::PseudoBucklingRing::PseudoBucklingRing ( const Vector< Data * > &  geom_data_pt,
TimeStepper time_stepper_pt 
)
inline

Constructor: 1 Lagrangian coordinate, 2 Eulerian coords. Pass buckling amplitude, ratio of of buckling amplitudes, buckling wavenumber (as a double), undeformed ring radius (all as Data) and pointer to global timestepper.

Geom_data_pt[0]->value(0) = Eps_buckl;
Geom_data_pt[0]->value(1) = Ampl_ratio;
Geom_data_pt[0]->value(2) = Double_N_buckl;
Geom_data_pt[0]->value(3) = R_0;
Geom_data_pt[0]->value(4) = T;
Vector< Data * > Geom_data_pt
Vector of pointers to Data items that affects the object's shape.
Definition: pseudo_buckling_ring.h:553
double T()
Access function for period of oscillation.
Definition: pseudo_buckling_ring.h:299
81  {
82 #ifdef PARANOID
83  if (geom_data_pt.size() != 1)
84  {
85  std::ostringstream error_message;
86  error_message << "geom_data_pt should be of size 1, but is of size"
87  << geom_data_pt.size() << std::endl;
88 
89  throw OomphLibError(error_message.str(),
92  }
93  if (geom_data_pt[0]->nvalue() != 5)
94  {
95  std::ostringstream error_message;
96  error_message << "geom_data_pt[0] should have 5 values, but has"
97  << geom_data_pt[0]->nvalue() << std::endl;
98 
99  throw OomphLibError(error_message.str(),
102  }
103 #endif
104  Geom_data_pt.resize(1);
105  Geom_data_pt[0] = geom_data_pt[0];
106 
107  // Data has been created externally: Must not clean up
108  Must_clean_up = false;
109  }
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Definition: nodes.h:483
TimeStepper *& time_stepper_pt()
Definition: geom_objects.h:192
GeomObject()
Default constructor.
Definition: geom_objects.h:104
bool Must_clean_up
Do I need to clean up?
Definition: pseudo_buckling_ring.h:556
Data * geom_data_pt(const unsigned &j)
Definition: pseudo_buckling_ring.h:545

References geom_data_pt(), Geom_data_pt, Must_clean_up, oomph::Data::nvalue(), OOMPH_CURRENT_FUNCTION, and OOMPH_EXCEPTION_LOCATION.

◆ PseudoBucklingRing() [3/5]

oomph::PseudoBucklingRing::PseudoBucklingRing ( const double eps_buckl,
const double ampl_ratio,
const unsigned  n_buckl,
const double r_0,
const double T,
TimeStepper time_stepper_pt 
)
inline

Constructor: 1 Lagrangian coordinate, 2 Eulerian coords. Pass buckling amplitude, ratio of of buckling amplitudes, buckling wavenumber, undeformed ring radius, period of osc and pointer to global timestepper. All geometric data is pinned by default.

122  : GeomObject(1, 2, time_stepper_pt)
123  {
124  // Number of previous timesteps that need to be stored
125  unsigned n_time = time_stepper_pt->nprev_values();
126 
127  // Setup geometric data for element: Five items of data live in
128  // in the one and only geometric data. Also store time history
129  Geom_data_pt.resize(1);
130  Geom_data_pt[0] = new Data(time_stepper_pt, 5);
131 
132  // I've created the data, I need to clean up
133  Must_clean_up = true;
134 
135  for (unsigned itime = 0; itime <= n_time; itime++)
136  {
137  // Buckling amplitude
138  Geom_data_pt[0]->set_value(itime, 0, eps_buckl);
139  Geom_data_pt[0]->pin(0);
140 
141  // Ratio of buckling amplitudes
142  Geom_data_pt[0]->set_value(itime, 1, ampl_ratio);
143  Geom_data_pt[0]->pin(1);
144 
145  // Buckling wavenumber (as double)
146  Geom_data_pt[0]->set_value(itime, 2, double(n_buckl));
147  Geom_data_pt[0]->pin(2);
148 
149  // Radius of undeformed ring
150  Geom_data_pt[0]->set_value(itime, 3, r_0);
151  Geom_data_pt[0]->pin(3);
152 
153  // Period of oscillation
154  Geom_data_pt[0]->set_value(itime, 4, T);
155  Geom_data_pt[0]->pin(4);
156  }
157  }
double r_0()
Access function for undeformed radius.
Definition: pseudo_buckling_ring.h:293
double eps_buckl()
Access function for buckling amplitude.
Definition: pseudo_buckling_ring.h:281
double ampl_ratio()
Access function for amplitude ratio.
Definition: pseudo_buckling_ring.h:287
virtual unsigned nprev_values() const =0
Number of previous values available: 0 for static, 1 for BDF<1>,...

References ampl_ratio(), eps_buckl(), Geom_data_pt, Must_clean_up, oomph::TimeStepper::nprev_values(), r_0(), and oomph::GeomObject::time_stepper_pt().

◆ PseudoBucklingRing() [4/5]

oomph::PseudoBucklingRing::PseudoBucklingRing ( const double eps_buckl,
const double HoR,
const unsigned n_buckl,
const unsigned imode,
TimeStepper time_stepper_pt 
)
inline

Constructor: 1 Lagrangian coordinate, 2 Eulerian coords. Pass buckling amplitude, h/R, buckling wavenumbe and pointer to global timestepper. Other parameters get set up to represent oscillating ring with mode imode (1 or 2). All geometric data is pinned by default.

170  : GeomObject(1, 2, time_stepper_pt)
171  {
172  // Constants in Soedel solution:
173  double K1 = (pow(double(n_buckl), 2) + 1.0) *
174  (1.0 / 12.0 * pow(double(n_buckl), 2) * pow(HoR, 2) + 1.0);
175 
176  double K2oK1sq =
177  1.0 / 12.0 * pow(HoR, 2) * pow(double(n_buckl), 2) *
178  pow((pow(double(n_buckl), 2) - 1.0), 2) /
179  (pow((pow(double(n_buckl), 2) + 1.0), 2) *
180  pow((1.0 / 12.0 * pow(double(n_buckl), 2) * pow(HoR, 2) + 1.0), 2));
181 
182  // The two fundamental frequencies:
183  double omega1 = sqrt(0.5 * K1 * (1.0 + sqrt(1.0 - 4 * K2oK1sq)));
184  double omega2 = sqrt(0.5 * K1 * (1.0 - sqrt(1.0 - 4 * K2oK1sq)));
185 
186  // The two amplitude ratios:
187  double ampl_ratio1 =
188  (double(n_buckl) *
189  (1.0 / 12.0 * pow(double(n_buckl), 2) * pow(HoR, 2) + 1.0)) /
190  (pow(omega1, 2) -
191  pow(double(n_buckl), 2) * (1.0 / 12.0 * pow(HoR, 2) + 1.0));
192 
193  double ampl_ratio2 =
194  double(n_buckl) *
195  (1.0 / 12.0 * pow(double(n_buckl), 2) * pow(HoR, 2) + 1.0) /
196  (pow(omega2, 2) -
197  pow(double(n_buckl), 2) * (1.0 / 12.0 * pow(HoR, 2) + 1.0));
198 
199  double T;
200  double ampl_ratio;
201 
202  if (n_buckl > 1)
203  {
204  T = 2.0 * MathematicalConstants::Pi / omega2;
205  ampl_ratio = ampl_ratio2;
206  if (imode == 1)
207  {
208  T = 2.0 * MathematicalConstants::Pi / omega1;
209  ampl_ratio = ampl_ratio1;
210  }
211  else if (imode == 2)
212  {
213  T = 2.0 * MathematicalConstants::Pi / omega2;
214  ampl_ratio = ampl_ratio2;
215  }
216  else
217  {
218  oomph_info << "wrong imode " << imode << std::endl;
219  }
220  }
221  else
222  {
223  T = 2.0 * MathematicalConstants::Pi / omega1;
224  ampl_ratio = ampl_ratio1;
225  }
226 
227  // Number of previous timesteps that need to be stored
228  unsigned n_time = time_stepper_pt->nprev_values();
229 
230  // Setup geometric data for element: Five items of data live in
231  // in the one and only geometric data. Also store time history
232  Geom_data_pt.resize(1);
233  Geom_data_pt[0] = new Data(time_stepper_pt, 5);
234 
235  // I've created the data, I need to clean up
236  Must_clean_up = true;
237 
238  for (unsigned itime = 0; itime <= n_time; itime++)
239  {
240  // Buckling amplitude
241  Geom_data_pt[0]->set_value(itime, 0, eps_buckl);
242  Geom_data_pt[0]->pin(0);
243 
244  // Ratio of buckling amplitudes
245  Geom_data_pt[0]->set_value(itime, 1, ampl_ratio);
246  Geom_data_pt[0]->pin(1);
247 
248  // Buckling wavenumber (as double)
249  Geom_data_pt[0]->set_value(itime, 2, double(n_buckl));
250  Geom_data_pt[0]->pin(2);
251 
252  // Radius of undeformed ring
253  Geom_data_pt[0]->set_value(itime, 3, 1.0);
254  Geom_data_pt[0]->pin(3);
255 
256  // Period of oscillation
257  Geom_data_pt[0]->set_value(itime, 4, T);
258  Geom_data_pt[0]->pin(4);
259  }
260  }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
const double Pi
50 digits from maple
Definition: oomph_utilities.h:157
OomphInfo oomph_info
Definition: oomph_definitions.cc:319

References ampl_ratio(), eps_buckl(), Geom_data_pt, Must_clean_up, oomph::TimeStepper::nprev_values(), oomph::oomph_info, oomph::MathematicalConstants::Pi, Eigen::bfloat16_impl::pow(), sqrt(), T(), and oomph::GeomObject::time_stepper_pt().

◆ PseudoBucklingRing() [5/5]

oomph::PseudoBucklingRing::PseudoBucklingRing ( const PseudoBucklingRing node)
delete

Broken copy constructor.

◆ ~PseudoBucklingRing()

oomph::PseudoBucklingRing::~PseudoBucklingRing ( )
inline

Destructor: Clean up if necessary.

270  {
271  // Do I need to clean up?
272  if (Must_clean_up)
273  {
274  delete Geom_data_pt[0];
275  Geom_data_pt[0] = 0;
276  }
277  }

References Geom_data_pt, and Must_clean_up.

Member Function Documentation

◆ accel()

void oomph::PseudoBucklingRing::accel ( const Vector< double > &  zeta,
Vector< double > &  accel 
)
inline

Parametrised acceleration on object at current time: accel = d^2 r(zeta)/dt^2.

417  {
418 #ifdef PARANOID
419  if (accel.size() != Ndim)
420  {
421  throw OomphLibError("The vector accel has the wrong dimension",
424  }
425 #endif
426 
427  // Parameter values at present time
428  double time = Geom_object_time_stepper_pt->time_pt()->time();
429  double Eps_buckl = Geom_data_pt[0]->value(0);
430  double Ampl_ratio = Geom_data_pt[0]->value(1);
431  double double_N_buckl = Geom_data_pt[0]->value(2);
432  // Unused double R_0 = Geom_data_pt[0]->value(3);
433  double T = Geom_data_pt[0]->value(4);
434 
435  // Accel
436  accel[0] = -Eps_buckl *
437  (cos(double_N_buckl * zeta[0]) * cos(zeta[0]) -
438  Ampl_ratio * sin(double_N_buckl * zeta[0]) * sin(zeta[0])) *
439  sin(2.0 * MathematicalConstants::Pi * time / T) * 4.0 *
441 
442  accel[1] = -Eps_buckl *
443  (cos(double_N_buckl * zeta[0]) * sin(zeta[0]) +
444  Ampl_ratio * sin(double_N_buckl * zeta[0]) * cos(zeta[0])) *
445  sin(2.0 * MathematicalConstants::Pi * time / T) * 4.0 *
447  }
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
TimeStepper * Geom_object_time_stepper_pt
Definition: geom_objects.h:435
unsigned Ndim
Number of Eulerian coordinates.
Definition: geom_objects.h:431
void accel(const Vector< double > &zeta, Vector< double > &accel)
Definition: pseudo_buckling_ring.h:416
Time *const & time_pt() const
Access function for the pointer to time (const version)
Definition: timesteppers.h:572
double & time()
Return the current value of the continuous time.
Definition: timesteppers.h:123
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152

References cos(), Geom_data_pt, oomph::GeomObject::Geom_object_time_stepper_pt, oomph::GeomObject::Ndim, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::MathematicalConstants::Pi, sin(), T(), oomph::Time::time(), oomph::TimeStepper::time_pt(), and Eigen::zeta().

Referenced by dposition_dt().

◆ ampl_ratio()

double oomph::PseudoBucklingRing::ampl_ratio ( )
inline

Access function for amplitude ratio.

288  {
289  return Geom_data_pt[0]->value(1);
290  }

References Geom_data_pt.

Referenced by PseudoBucklingRing(), and set_ampl_ratio().

◆ dposition_dt()

void oomph::PseudoBucklingRing::dposition_dt ( const Vector< double > &  zeta,
const unsigned j,
Vector< double > &  drdt 
)
inlinevirtual

j-th time-derivative on object at current time: \( \frac{d^{j} r(\zeta)}{dt^j} \).

Reimplemented from oomph::GeomObject.

508  {
509  switch (j)
510  {
511  // Current position
512  case 0:
513  position(zeta, drdt);
514  break;
515 
516  // Velocity:
517  case 1:
518  veloc(zeta, drdt);
519  break;
520 
521  // Acceleration:
522  case 2:
523  accel(zeta, drdt);
524  break;
525 
526  default:
527  std::ostringstream error_message;
528  error_message << j << "th derivative not implemented\n";
529 
530  throw OomphLibError(error_message.str(),
533  }
534  }
void position(const Vector< double > &zeta, Vector< double > &r) const
Definition: pseudo_buckling_ring.h:344
void veloc(const Vector< double > &zeta, Vector< double > &veloc)
Definition: pseudo_buckling_ring.h:381
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References accel(), j, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, position(), veloc(), and Eigen::zeta().

◆ eps_buckl()

double oomph::PseudoBucklingRing::eps_buckl ( )
inline

Access function for buckling amplitude.

282  {
283  return Geom_data_pt[0]->value(0);
284  }

References Geom_data_pt.

Referenced by PseudoBucklingRing(), and set_eps_buckl().

◆ geom_data_pt()

Data* oomph::PseudoBucklingRing::geom_data_pt ( const unsigned j)
inlinevirtual

Return pointer to the j-th Data item that the object's shape depends on

Reimplemented from oomph::GeomObject.

546  {
547  return Geom_data_pt[j];
548  }

References Geom_data_pt, and j.

Referenced by PseudoBucklingRing().

◆ n_buckl_float()

double oomph::PseudoBucklingRing::n_buckl_float ( )
inline

Access function for buckling wavenumber (as float)

306  {
307  return Geom_data_pt[0]->value(2);
308  }

References Geom_data_pt.

◆ ngeom_data()

unsigned oomph::PseudoBucklingRing::ngeom_data ( ) const
inlinevirtual

How many items of Data does the shape of the object depend on?

Reimplemented from oomph::GeomObject.

539  {
540  return Geom_data_pt.size();
541  }

References Geom_data_pt.

◆ operator=()

void oomph::PseudoBucklingRing::operator= ( const PseudoBucklingRing )
delete

Broken assignment operator.

◆ position() [1/2]

void oomph::PseudoBucklingRing::position ( const unsigned t,
const Vector< double > &  zeta,
Vector< double > &  r 
) const
inlinevirtual

Position Vector at Lagrangian coordinate zeta at discrete previous time (t=0: present time; t>0: previous time)

Reimplemented from oomph::GeomObject.

455  {
456 #ifdef PARANOID
457  if (r.size() != Ndim)
458  {
459  throw OomphLibError("The position vector r has the wrong dimension",
462  }
464  {
465  throw OomphLibError(
466  "The time value t is greater than the number of previous steps",
469  }
470 #endif
471 
472  // Parameter values at previous time
473  double Eps_buckl = Geom_data_pt[0]->value(t, 0);
474  double Ampl_ratio = Geom_data_pt[0]->value(t, 1);
475  double double_N_buckl = Geom_data_pt[0]->value(t, 2);
476  double R_0 = Geom_data_pt[0]->value(t, 3);
477  double T = Geom_data_pt[0]->value(4);
478 
479  // Present time
480  double time = Geom_object_time_stepper_pt->time_pt()->time();
481 
482  // Recover time at previous timestep
483  for (unsigned i = 0; i < t; i++)
484  {
486  }
487 
488  // Position Vector
489  r[0] = R_0 * cos(zeta[0]) +
490  Eps_buckl *
491  (cos(double_N_buckl * zeta[0]) * cos(zeta[0]) -
492  Ampl_ratio * sin(double_N_buckl * zeta[0]) * sin(zeta[0])) *
493  sin(2.0 * MathematicalConstants::Pi * time / T);
494 
495  r[1] = R_0 * sin(zeta[0]) +
496  Eps_buckl *
497  (cos(double_N_buckl * zeta[0]) * sin(zeta[0]) +
498  Ampl_ratio * sin(double_N_buckl * zeta[0]) * cos(zeta[0])) *
499  sin(2.0 * MathematicalConstants::Pi * time / T);
500  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
double & dt(const unsigned &t=0)
Definition: timesteppers.h:136
r
Definition: UniformPSDSelfTest.py:20
t
Definition: plotPSD.py:36

References cos(), oomph::Time::dt(), Geom_data_pt, oomph::GeomObject::Geom_object_time_stepper_pt, i, oomph::GeomObject::Ndim, oomph::TimeStepper::nprev_values(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::MathematicalConstants::Pi, UniformPSDSelfTest::r, sin(), plotPSD::t, oomph::Time::time(), oomph::TimeStepper::time_pt(), and Eigen::zeta().

◆ position() [2/2]

void oomph::PseudoBucklingRing::position ( const Vector< double > &  zeta,
Vector< double > &  r 
) const
inlinevirtual

Position Vector at Lagrangian coordinate zeta at present time

Implements oomph::GeomObject.

345  {
346 #ifdef PARANOID
347  if (r.size() != Ndim)
348  {
349  throw OomphLibError("The position vector r has the wrong dimension",
352  }
353 #endif
354 
355  // Parameter values at present time
356  double time = Geom_object_time_stepper_pt->time_pt()->time();
357  double Eps_buckl = Geom_data_pt[0]->value(0);
358  double Ampl_ratio = Geom_data_pt[0]->value(1);
359  double double_N_buckl = Geom_data_pt[0]->value(2);
360  double R_0 = Geom_data_pt[0]->value(3);
361  double T = Geom_data_pt[0]->value(4);
362 
363 
364  // Position Vector
365  r[0] = R_0 * cos(zeta[0]) +
366  Eps_buckl *
367  (cos(double_N_buckl * zeta[0]) * cos(zeta[0]) -
368  Ampl_ratio * sin(double_N_buckl * zeta[0]) * sin(zeta[0])) *
369  sin(2.0 * MathematicalConstants::Pi * time / T);
370 
371  r[1] = R_0 * sin(zeta[0]) +
372  Eps_buckl *
373  (cos(double_N_buckl * zeta[0]) * sin(zeta[0]) +
374  Ampl_ratio * sin(double_N_buckl * zeta[0]) * cos(zeta[0])) *
375  sin(2.0 * MathematicalConstants::Pi * time / T);
376  }

References cos(), Geom_data_pt, oomph::GeomObject::Geom_object_time_stepper_pt, oomph::GeomObject::Ndim, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::MathematicalConstants::Pi, UniformPSDSelfTest::r, sin(), oomph::Time::time(), oomph::TimeStepper::time_pt(), and Eigen::zeta().

Referenced by dposition_dt().

◆ r_0()

double oomph::PseudoBucklingRing::r_0 ( )
inline

Access function for undeformed radius.

294  {
295  return Geom_data_pt[0]->value(3);
296  }

References Geom_data_pt.

Referenced by oomph::PseudoBucklingRingElement::get_residuals_generic(), PseudoBucklingRing(), and set_R_0().

◆ set_ampl_ratio()

void oomph::PseudoBucklingRing::set_ampl_ratio ( const double ampl_ratio)
inline

Set amplitude ratio between radial and azimuthal buckling displacements

319  {
320  Geom_data_pt[0]->set_value(1, ampl_ratio);
321  }

References ampl_ratio(), and Geom_data_pt.

◆ set_eps_buckl()

void oomph::PseudoBucklingRing::set_eps_buckl ( const double eps_buckl)
inline

Set buckling amplitude.

312  {
313  Geom_data_pt[0]->set_value(0, eps_buckl);
314  }

References eps_buckl(), and Geom_data_pt.

◆ set_n_buckl()

void oomph::PseudoBucklingRing::set_n_buckl ( const unsigned n_buckl)
inline

Set buckling wavenumber.

325  {
326  Geom_data_pt[0]->set_value(2, double(n_buckl));
327  }

References Geom_data_pt.

◆ set_R_0()

void oomph::PseudoBucklingRing::set_R_0 ( const double r_0)
inline

Set undeformed radius of ring.

331  {
332  Geom_data_pt[0]->set_value(3, r_0);
333  }

References Geom_data_pt, and r_0().

◆ set_T()

void oomph::PseudoBucklingRing::set_T ( const double T)
inline

Set period of oscillation.

337  {
338  Geom_data_pt[0]->set_value(4, T);
339  }

References Geom_data_pt.

◆ T()

double oomph::PseudoBucklingRing::T ( )
inline

Access function for period of oscillation.

300  {
301  return Geom_data_pt[0]->value(4);
302  }

References Geom_data_pt.

Referenced by accel(), PseudoBucklingRing(), and veloc().

◆ veloc()

void oomph::PseudoBucklingRing::veloc ( const Vector< double > &  zeta,
Vector< double > &  veloc 
)
inline

Parametrised velocity on object at current time: veloc = d r(zeta)/dt.

382  {
383 #ifdef PARANOID
384  if (veloc.size() != Ndim)
385  {
386  throw OomphLibError("The vector veloc has the wrong size",
389  }
390 #endif
391 
392  // Parameter values at present time
393  double time = Geom_object_time_stepper_pt->time_pt()->time();
394  double Eps_buckl = Geom_data_pt[0]->value(0);
395  double Ampl_ratio = Geom_data_pt[0]->value(1);
396  double double_N_buckl = Geom_data_pt[0]->value(2);
397  // Unused double R_0 = Geom_data_pt[0]->value(3);
398  double T = Geom_data_pt[0]->value(4);
399 
400  // Veloc
401  veloc[0] = Eps_buckl *
402  (cos(double_N_buckl * zeta[0]) * cos(zeta[0]) -
403  Ampl_ratio * sin(double_N_buckl * zeta[0]) * sin(zeta[0])) *
404  cos(2.0 * MathematicalConstants::Pi * time / T) * 2.0 *
406  veloc[1] = Eps_buckl *
407  (cos(double_N_buckl * zeta[0]) * sin(zeta[0]) +
408  Ampl_ratio * sin(double_N_buckl * zeta[0]) * cos(zeta[0])) *
409  cos(2.0 * MathematicalConstants::Pi * time / T) * 2.0 *
411  }

References cos(), Geom_data_pt, oomph::GeomObject::Geom_object_time_stepper_pt, oomph::GeomObject::Ndim, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, oomph::MathematicalConstants::Pi, sin(), T(), oomph::Time::time(), oomph::TimeStepper::time_pt(), and Eigen::zeta().

Referenced by dposition_dt().

Member Data Documentation

◆ Geom_data_pt

◆ Must_clean_up

bool oomph::PseudoBucklingRing::Must_clean_up
protected

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