In this document, we discuss the solution of the buckling of a cylindrical shell using oomph-lib's
KirchhoffLoveShell elements.
#include <iostream>
#include <fstream>
#include <cmath>
#include <typeinfo>
#include <algorithm>
#include <cstdio>
#include "generic.h"
#include "shell.h"
#include "meshes/rectangular_quadmesh.h"
using namespace std;
using namespace oomph;
{
{
for(
unsigned i=0;
i<3;
i++)
{
}
}
}
template <class ELEMENT>
class ShellMesh :
public virtual RectangularQuadMesh<ELEMENT>,
public virtual SolidMesh
{
public:
const double &
lx,
const double &
ly);
};
template <class ELEMENT>
{
{
}
{
{
}
}
}
template <class ELEMENT>
{
{
for(
unsigned i=0;
i<3;
i++)
{
}
}
}
template<class ELEMENT>
{
public:
const double &
lx,
const double &
ly);
private:
};
template<class ELEMENT>
const double &
lx,
const double &
ly)
{
mesh_pt()->assign_undeformed_positions(Undeformed_midplane_pt);
mesh_pt()->element_reorder();
unsigned n_ends = mesh_pt()->nboundary_node(1);
{
mesh_pt()->boundary_node_pt(1,
i)->pin_position(2);
mesh_pt()->boundary_node_pt(3,
i)->pin_position(2);
mesh_pt()->boundary_node_pt(1,
i)->pin_position(2,2);
mesh_pt()->boundary_node_pt(3,
i)->pin_position(2,2);
mesh_pt()->boundary_node_pt(1,
i)->pin_position(0);
mesh_pt()->boundary_node_pt(3,
i)->pin_position(0);
mesh_pt()->boundary_node_pt(1,
i)->pin_position(2,0);
mesh_pt()->boundary_node_pt(3,
i)->pin_position(2,0);
mesh_pt()->boundary_node_pt(1,
i)->pin_position(1);
mesh_pt()->boundary_node_pt(3,
i)->pin_position(1);
mesh_pt()->boundary_node_pt(1,
i)->pin_position(2,1);
mesh_pt()->boundary_node_pt(3,
i)->pin_position(2,1);
mesh_pt()->boundary_node_pt(1,
i)->pin_position(1,0);
mesh_pt()->boundary_node_pt(1,
i)->pin_position(1,1);
mesh_pt()->boundary_node_pt(3,
i)->pin_position(1,0);
mesh_pt()->boundary_node_pt(3,
i)->pin_position(1,1);
mesh_pt()->boundary_node_pt(1,
i)->pin_position(3,0);
mesh_pt()->boundary_node_pt(1,
i)->pin_position(3,1);
mesh_pt()->boundary_node_pt(3,
i)->pin_position(3,0);
mesh_pt()->boundary_node_pt(3,
i)->pin_position(3,1);
}
unsigned n_side = mesh_pt()->nboundary_node(0);
{
mesh_pt()->boundary_node_pt(0,
i)->pin_position(1);
mesh_pt()->boundary_node_pt(0,
i)->pin_position(1,1);
mesh_pt()->boundary_node_pt(0,
i)->pin_position(2,0);
mesh_pt()->boundary_node_pt(0,
i)->pin_position(2,2);
mesh_pt()->boundary_node_pt(0,
i)->pin_position(3,0);
mesh_pt()->boundary_node_pt(0,
i)->pin_position(3,2);
mesh_pt()->boundary_node_pt(2,
i)->pin_position(0);
mesh_pt()->boundary_node_pt(2,
i)->pin_position(1,0);
mesh_pt()->boundary_node_pt(2,
i)->pin_position(2,1);
mesh_pt()->boundary_node_pt(2,
i)->pin_position(2,2);
mesh_pt()->boundary_node_pt(2,
i)->pin_position(3,1);
mesh_pt()->boundary_node_pt(2,
i)->pin_position(3,2);
}
{
}
else
{
}
std::cout << std::endl;
std::cout <<
"Controlled element: " <<
nel_ctrl << std::endl;
std::cout << "Displacement control applied at xi = ("
<<
xi[0] <<
", " <<
xi[1] <<
")" << std::endl;
std::cout << "Corresponding to x = ("
<<
x[0] <<
", " <<
x[1] <<
", " <<
x[2] <<
")" << std::endl;
{
el_pt->undeformed_midplane_pt() = Undeformed_midplane_pt;
{
el_pt->pre_compute_d2shape_lagrangian_at_knots();
}
else
{
}
}
Trace_node_pt = mesh_pt()->finite_element_pt(2*
ny-1)->node_pt(3);
Trace_node2_pt = mesh_pt()->finite_element_pt(
ny)->node_pt(1);
}
template<class ELEMENT>
{
for(
unsigned i=1;
i<11;
i++)
{
cout << std::endl <<
"Increasing displacement: Prescribed_y is "
<< " "
<< Trace_node_pt->x(0) << " " << Trace_node_pt->x(1) << " "
<< Trace_node2_pt->x(0) << " " << Trace_node2_pt->x(1) << std::endl;
}
mesh_pt()->output(
file,5);
}
{
}
A 2D Mesh class. The tube wall is represented by two Lagrangian coordinates that correspond to z and ...
void assign_undeformed_positions(GeomObject *const &undeformed_midplane_pt)
In all elastic problems, the nodes must be assigned an undeformed, or reference, position,...
ShellMesh(const unsigned &nx, const unsigned &ny, const double &lx, const double &ly)
Constructor for the mesh.
Node * Trace_node2_pt
Second trace node.
GeomObject * Undeformed_midplane_pt
Pointer to GeomObject that specifies the undeformed midplane.
ShellProblem(const unsigned &nx, const unsigned &ny, const double &lx, const double &ly)
Constructor.
void actions_before_newton_solve()
Actions before solve empty.
Node * Trace_node_pt
First trace node.
void actions_after_newton_solve()
Actions after solve empty.
ShellMesh< ELEMENT > * mesh_pt()
Overload Access function for the mesh.
Global variables that represent physical properties.
double external_pressure()
Return a reference to the external pressure load on the elastic tube.
void press_load(const Vector< double > &xi, const Vector< double > &x, const Vector< double > &N, Vector< double > &load)
Load function, normal pressure loading.
double Prescribed_y
Prescribed position of control point.
double Pcos
Perturbation pressure.
Data * Pext_data_pt
Pointer to pressure load (stored in Data so it can become an unknown in the problem when displacement...