Detailed documentation to be written. Here's the driver code...
(This problem is solved using spatially adaptive elements with a pseudo-elastic remesh strategy)
#include "generic.h"
#include "navier_stokes.h"
#include "solid.h"
#include "fluid_interface.h"
using namespace oomph;
{
{
}
}
{
private:
public:
const double &
a,
const double &
b)
{
}
{
}
{
}
};
{
public:
private:
public:
{
for (
unsigned i=0;
i<6;
i++)
}
{
for(
unsigned i=0;
i<2;
i++)
{
}
}
{
#ifdef WARN_ABOUT_SUBTLY_CHANGED_OOMPH_INTERFACES
"Order of function arguments has changed between versions 0.8 and 0.85",
"CylinderAndInterfaceDomain::macro_element_boundary(...)",
#endif
{
case 0:
{
break;
break;
break;
break;
default:
}
break;
case 1:
{
break;
break;
break;
break;
default:
}
break;
case 2:
{
break;
break;
break;
break;
default:
}
break;
case 3:
{
break;
break;
break;
break;
default:
}
break;
case 4:
{
break;
break;
break;
break;
default:
}
break;
case 5:
{
break;
break;
break;
break;
default:
}
break;
default:
}
}
};
template<class ELEMENT>
{
protected:
public:
{
{
{
{
}
}
}
for(
unsigned n=0;
n<
Np;
n++)
{
}
for(
unsigned n=0;
n<
Np;
n++)
{
}
for(
unsigned n=0;
n<
Np;
n++)
{
}
for(
unsigned n=0;
n<
Np;
n++)
{
}
for(
unsigned n=0;
n<
Np;
n++)
{
}
for(
unsigned n=0;
n<
Np;
n++)
{
}
{
}
for(
unsigned n=0;
n<
Np;
n++)
{
}
for(
unsigned n=1;
n<
Np;
n++)
{
}
for(
unsigned n=1;
n<
Np;
n++)
{
}
for(
unsigned n=1;
n<
Np-1;
n++)
{
}
{
for(
unsigned i=0;
i<2;
i++)
}
}
};
template<class ELEMENT>
{
public:
{
for (
unsigned e=0;
e<6;
e++)
{
}
}
};
template<class ELEMENT>
{
private:
public:
{
}
{
for(
unsigned b=0;
b<4;
b++)
{
{
}
}
}
{
{
}
}
{
{
{
}
}
{
throw OomphLibError(
"No Surface Element adjacent to boundary 1\n",
}
}
{
{
}
}
};
template<class ELEMENT>
Re(0.0), Ca(0.001),
ReInvFr(0.0),
Bo(0.0), Omega(1.0),
Volume(12.0),
Angle(1.57)
{
G.resize(2);
G[0] = 0.0; G[1] = -1.0;
ReInvFr = Bo/Ca;
Bulk_mesh_pt=
Problem::time_stepper_pt());
Bulk_mesh_pt->refine_uniformly();
Bulk_mesh_pt->refine_uniformly();
unsigned Nelement = Bulk_mesh_pt->nelement();
{
dynamic_cast<ELEMENT*
>(Bulk_mesh_pt->element_pt(
e))->
}
Traded_pressure_data_pt =
new Data(1);
Surface_mesh_pt =
new Mesh;
Point_mesh_pt =
new Mesh;
Volume_constraint_mesh_pt =
new Mesh;
finish_problem_setup();
}
template<class ELEMENT>
{
this->create_free_surface_elements();
this->create_volume_constraint_elements();
unsigned num_bound = Bulk_mesh_pt->nboundary();
{
{
Bulk_mesh_pt->boundary_node_pt(
ibound,
inod)->pin(0);
Bulk_mesh_pt->boundary_node_pt(
ibound,
inod)->pin(1);
}
}
{
unsigned num_nod= Bulk_mesh_pt->nboundary_node(3);
{
Bulk_mesh_pt->boundary_node_pt(3,
inod)->pin(0);
}
}
{
unsigned num_nod= Bulk_mesh_pt->nboundary_node(1);
{
Bulk_mesh_pt->boundary_node_pt(1,
inod)->pin(0);
Bulk_mesh_pt->boundary_node_pt(1,
inod)->pin(1);
}
}
(Point_mesh_pt->element_pt(0))->
ca_pt() = &Ca;
(Point_mesh_pt->element_pt(0))->
unsigned num_nod= Bulk_mesh_pt->nboundary_node(0);
{
Bulk_mesh_pt->boundary_node_pt(0,
inod)->pin_position(0);
Bulk_mesh_pt->boundary_node_pt(0,
inod)->pin_position(1);
}
num_nod= Bulk_mesh_pt->nboundary_node(1);
{
Bulk_mesh_pt->boundary_node_pt(1,
inod)->pin_position(0);
}
num_nod= Bulk_mesh_pt->nboundary_node(3);
{
Bulk_mesh_pt->boundary_node_pt(3,
inod)->pin_position(0);
}
num_nod= Bulk_mesh_pt->nboundary_node(4);
{
Bulk_mesh_pt->boundary_node_pt(4,
inod)->pin_position(0);
Bulk_mesh_pt->boundary_node_pt(4,
inod)->pin_position(1);
}
unsigned Nfluid = Bulk_mesh_pt->nelement();
unsigned Nfree = Surface_mesh_pt->nelement();
{
temp_pt->constitutive_law_pt() = Constitutive_law_pt;
}
Bulk_mesh_pt->element_pt());
{
(Surface_mesh_pt->element_pt(
i));
}
}
template<class ELEMENT>
{
unsigned Nnode = Bulk_mesh_pt->nboundary_node(4);
{
double x = Bulk_mesh_pt->boundary_node_pt(4,
n)->x(0);
double y = Bulk_mesh_pt->boundary_node_pt(4,
n)->x(1);
Bulk_mesh_pt->boundary_node_pt(4,
n)->set_value(0,-Omega*
r*
sin(
theta));
Bulk_mesh_pt->boundary_node_pt(4,
n)->set_value(1, Omega*
r*
cos(
theta));
}
}
template<class ELEMENT>
{
trace << Ca <<
" " << ReInvFr <<
" "
<< Bulk_mesh_pt->boundary_node_pt(2,0)->x(1) <<
std::endl;
for(
unsigned i=0;
i<2;
i++)
{
{
Angle -= 0.1;
}
else
{
}
trace << Ca <<
" " << ReInvFr <<
" " << Angle <<
" "
<< Bulk_mesh_pt->boundary_node_pt(2,0)->x(1) <<
std::endl;
unsigned Nnode = Bulk_mesh_pt->nnode();
{
}
unsigned Nfree = Surface_mesh_pt->nelement();
{
(Surface_mesh_pt->element_pt(
n));
}
}
}
{
}
double Lower_centre_right[2]
double Upper_centre_right[2]
double Upper_centre_left[2]
double Lower_centre_left[2]
double Lower_mid_right[2]
void macro_element_boundary(const unsigned &time, const unsigned &m, const unsigned &direction, const Vector< double > &s, Vector< double > &f)
GeomObject * Cylinder_pt
Geometric object that represents the rotating cylinder.
~CylinderAndInterfaceDomain()
void linear_interpolate(double Left[2], double Right[2], const double &s, Vector< double > &f)
double Upper_mid_right[2]
CylinderAndInterfaceDomain * Domain_pt
CylinderAndInterfaceDomain * domain_pt()
void position(const Vector< double > &xi, Vector< double > &r) const
RefineableCylinderAndInterfaceMesh(const double &length, const double &height, TimeStepper *time_stepper_pt)
virtual ~RefineableCylinderAndInterfaceMesh()
Destructor: Empty.
void create_volume_constraint_elements()
Create the volume constraint elements.
void delete_volume_constraint_elements()
void actions_before_newton_solve()
Update the problem specs before solve:
Mesh * Volume_constraint_mesh_pt
The volume constraint mesh.
void finish_problem_setup()
Complete problem setup: Setup element-specific things (source fct pointers etc.)
ConstitutiveLaw * Constitutive_law_pt
void create_free_surface_elements()
void actions_before_adapt()
Strip off the interface before adaptation.
Data * Traded_pressure_data_pt
RefineableRotatingCylinderProblem(const double &length, const double &height)
Constructor: Pass flag to indicate if you want a constant source function or the tanh profile.
void set_boundary_conditions()
void delete_free_surface_elements()
RefineableCylinderAndInterfaceMesh< ELEMENT > * Bulk_mesh_pt
void actions_after_newton_solve()
Update the problem specs after solve (empty)
void actions_after_adapt()
Namespace for physical parameters.
void wall_unit_normal_fct(const Vector< double > &x, Vector< double > &normal)
Function that specifies the wall unit normal.
double Nu
Pseudo-solid Poisson ratio.
Vector< double > Wall_normal
Direction of the wall normal vector.