plate.cc File Reference
#include "generic.h"
#include "shell.h"
#include "meshes/rectangular_quadmesh.h"

Classes

class  FlatPlate
 Flat plate in x-y plane. More...
 
class  FlatPlateMesh< ELEMENT >
 
class  PlateProblem< ELEMENT >
 

Namespaces

 Global_Physical_Variables
 Global variables.
 

Functions

doubleGlobal_Physical_Variables::external_pressure ()
 Access function to value of external pressure. More...
 
void Global_Physical_Variables::press_load (const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
 Load function: Perturbation pressure to force non-axisymmetric deformation. More...
 
int main (int argc, char *argv[])
 Driver. More...
 

Variables

double Global_Physical_Variables::Prescribed_z = 0.0
 Prescribed position of control point. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)

Driver.

(pow(0.05,3)/12.0) << " "

552 {
553 
554  //Store command line arguments
555  CommandLineArgs::setup(argc,argv);
556 
557  //Length of domain
558  double L_x=10.0;
559  double L_y=1.0;
560 
561  //Set up the problem
563  problem(10,3,L_x,L_y);
564 
565  ofstream some_file;
566  char filename[100];
567 
568  // Label for output
569  DocInfo doc_info;
570 
571  // Output directory
572  doc_info.set_directory("RESLT");
573 
574  //Open an output trace file
575  sprintf(filename,"%s/trace.dat",doc_info.directory().c_str());
576  ofstream trace_file(filename);
577  trace_file << "VARIABLES=\"p_e_x_t\",\"z_ctrl\"" << std::endl;
578  trace_file << "ZONE" << std::endl;
579 
580  //Gradually deflect the plate by decreasing the value of the prescribed
581  //position
582  unsigned nstep=2;
583  for(unsigned i=0;i<nstep;i++)
584  {
585 
586  // Increase displacement
588 
589  // Solve
590  problem.newton_solve();
591 
592 
593  // Calculate exact solution for `string under tension' (applicable for
594  // small wall thickness and pinned ends)
595 
596  // The tangent of the angle beta
597  double tanbeta =-2.0*Global_Physical_Variables::Prescribed_z/L_x;
598 
599  double exact_pressure = 0.0;
600  //If the plate has deformed, calculate the pressure required
601  if(tanbeta!=0)
602  {
603 
604  //Calculate the opening angle alpha
605  double alpha = 2.0*atan(2.0*tanbeta/(1.0-tanbeta*tanbeta));
606 
607  // Jump back onto the main branch if alpha>180 degrees
609 
610  // Green strain:
611  double gamma=0.5*(0.25*alpha*alpha/(sin(0.5*alpha)*sin(0.5*alpha))-1.0);
612 
613  //Calculate the exact pressure
614  exact_pressure=Global_Physical_Variables::H*
616  }
617 
618 
619  //Output the pressure
620  trace_file
623  << exact_pressure << " "
624  << std::endl;
625 
626 
627  //Output the shape
628  sprintf(filename,"%s/plate%i.dat",doc_info.directory().c_str(),
629  doc_info.number());
630  some_file.open(filename);
631  problem.mesh_pt()->output(some_file,15);
632 // for (unsigned e=0;e<nelem;e++)
633 // {
634 // mesh_pt()->finite_element_pt(e)->output(some_file,15);
635 // }
636  some_file.close();
637 
638  // Increment counter for output files
639  doc_info.number()++;
640 
641  }
642 
643  //Close the trace file
644  trace_file.close();
645 
646 }
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Definition: plate.cc:315
Definition: oomph_utilities.h:499
std::string directory() const
Output directory.
Definition: oomph_utilities.h:524
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
unsigned & number()
Number used (e.g.) for labeling output files.
Definition: oomph_utilities.h:554
RealScalar alpha
Definition: level1_cplx_impl.h:151
double Pi
Definition: two_d_biharmonic.cc:235
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 atan(const bfloat16 &a)
Definition: BFloat16.h:636
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
double L_y
Definition: navier_stokes/navier_stokes_with_singularity/driven_cavity.cc:192
double L_x
Definition: navier_stokes/navier_stokes_with_singularity/driven_cavity.cc:189
double Sigma0
2nd Piola Kirchhoff pre-stress
Definition: tensioned_string.cc:46
double & external_pressure()
Access function to value of external pressure.
Definition: steady_ring.cc:79
double Prescribed_z
Prescribed position of control point.
Definition: plate.cc:274
double H
Nondim thickness.
Definition: steady_ring.cc:50
string filename
Definition: MergeRestartFiles.py:39
Mdouble gamma(Mdouble gamma_in)
This is the gamma function returns the true value for the half integer value.
Definition: ExtendedMath.cc:116
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References alpha, Eigen::bfloat16_impl::atan(), oomph::DocInfo::directory(), Global_Physical_Variables::external_pressure(), MergeRestartFiles::filename, mathsFunc::gamma(), Global_Physical_Variables::H, i, Global_Parameters::L_x, Global_Parameters::L_y, oomph::DocInfo::number(), BiharmonicTestFunctions2::Pi, Global_Physical_Variables::Prescribed_z, problem, oomph::DocInfo::set_directory(), Flag_definition::setup(), Global_Physical_Variables::Sigma0, and sin().