space_time_oscillating_cylinder.cc File Reference
#include <cstring>
#include <limits>
#include "generic.h"
#include "navier_stokes.h"
#include "space_time_navier_stokes.h"
#include "meshes/rectangle_with_moving_cylinder_mesh.h"
#include "meshes/extruded_cube_mesh_from_quad_mesh_with_macro_elements.h"
#include "space_time_block_preconditioner.h"

Classes

class  oomph::MyRefineableQTaylorHoodElement
 Overloaded element that allows projection of use as PML element. More...
 
class  oomph::PMLLayerElement< MyRefineableQTaylorHoodElement >
 Policy class defining the elements to be used in the PML layers. Same! More...
 
class  oomph::FaceGeometry< MyRefineableQTaylorHoodElement >
 
class  OscillatingCylinder
 Oscillating cylinder class. More...
 
class  NavierStokesProblem< ELEMENT >
 Entry flow problem in quarter tube domain. More...
 

Namespaces

 oomph
 DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
 
 NodeReordering
 Contains helper function to reorganise nodes.
 
 GlobalParameters
 Global parameters.
 
 SubsidiaryPreconditionerHelper
 

Functions

bool NodeReordering::node_global_position_comparison (Node *nd1_pt, Node *nd2_pt)
 
void NodeReordering::get_node_reordering (Mesh *mesh_pt, Vector< Node * > &reordering, const bool &use_old_ordering)
 
void NodeReordering::reorder_nodes (Mesh *mesh_pt, const bool &use_old_ordering)
 
double GlobalParameters::calculate_strouhal_number (const double &re)
 
void GlobalParameters::update_physical_parameters ()
 
void GlobalParameters::update_mesh_parameters ()
 
void GlobalParameters::set_up_dof_to_block_mapping (Vector< unsigned > &dof_to_block_map)
 
void GlobalParameters::doc_maximum_central_box_deformation ()
 Document the maximum deformation inside the central box. More...
 
std::string GlobalParameters::parameter_to_string (const double *const parameter_pt)
 
void GlobalParameters::find_node_on_centerline (Mesh *mesh_pt, FiniteElement **el_centerline_pt, unsigned &node_index)
 --------------------—Documentation Helpers----------------------— More...
 
double GlobalParameters::round (const double &d)
 ---------------------------------------—DOCUMENTATION HELPERS---— More...
 
PreconditionerSubsidiaryPreconditionerHelper::get_new_preconditioner ()
 
int main (int argc, char **argv)
 Driver code for unsteady heat equation. More...
 

Variables

double GlobalParameters::Amplitude_target =0.50
 
unsigned GlobalParameters::N_amplitude_step =5
 The number of steps used to reach the target amplitude. More...
 
double GlobalParameters::Period_ratio_target =1.0
 
unsigned GlobalParameters::N_period_ratio_step =1
 The number of steps used to reach the target Period_ratio value. More...
 
unsigned GlobalParameters::N_re_step =2
 
double GlobalParameters::L_t =1.0
 The length of the mesh in the time direction. More...
 
unsigned GlobalParameters::N_t =25
 The number of elements in the time direction. More...
 
unsigned GlobalParameters::Preconditioner =0
 ----------------------—Domain Properties------------------------— More...
 
unsigned GlobalParameters::N_dof_type =0
 
std::ofstream GlobalParameters::Trace_file
 Trace file to doc. asymmetry norm data in. More...
 
bool GlobalParameters::Document_solution =true
 Helper variable to indicate whether or not to document the solution. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

Driver code for unsteady heat equation.

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////

2051 {
2052 #ifdef OOMPH_HAS_MPI
2053  // Initialise MPI
2054  MPI_Helpers::init(argc,argv);
2055 
2056  // Switch off output modifier
2058 
2059  // Switch off oomph_info output for all processors but rank 0
2060  if (MPI_Helpers::communicator_pt()->my_rank()!=0)
2061  {
2063  OomphLibWarning::set_stream_pt(&oomph_nullstream);
2064  OomphLibError::set_stream_pt(&oomph_nullstream);
2065  }
2066  else
2067  {
2068  oomph_info << "\n=====================================================\n"
2069  << "Number of processors: "
2070  << MPI_Helpers::communicator_pt()->nproc()
2071  << "\n=====================================================\n"
2072  << std::endl;
2073  }
2074 #endif
2075 
2076  // Output directory
2078 
2079  //----------------------
2080  // Problem setup & solve
2081  //----------------------
2082  // Typedef the block preconditionable element type
2084 
2085  // Start the clock
2086  double timer_s=TimingHelpers::timer();
2087 
2088  // Build problem
2090 
2091  // Tell the user
2093  << "\nSolving with the following problem parameters:"
2095  << ANSIEscapeCode::Red << "\n - Re: " << ANSIEscapeCode::Reset
2097  << ANSIEscapeCode::Red << "\n - ReSt: " << ANSIEscapeCode::Reset
2099  << ANSIEscapeCode::Red << "\n - A: " << ANSIEscapeCode::Reset
2101  << ANSIEscapeCode::Red << "\n - T_e/T_s: " << ANSIEscapeCode::Reset
2103  << std::endl;
2104 
2105  // Solve the problem again
2106  problem.newton_solve();
2107 
2108  // Doc the solution
2109  problem.doc_solution();
2110 
2111  // Use parameter continuation in the Reynolds number
2112  problem.run_natural_continuation(GlobalParameters::Re,
2115 
2116  // Doc the solution
2117  problem.doc_solution();
2118 
2119  // Use parameter continuation for the amplitude value
2120  problem.run_natural_continuation(GlobalParameters::Amplitude,
2123 
2124  // Doc the solution
2125  problem.doc_solution();
2126 
2127  // Tell the user we're done
2128  oomph_info << "\nSimulation complete!\nTotal time for simulation [sec]: "
2129  << TimingHelpers::timer()-timer_s << std::endl;
2130 
2131 #ifdef OOMPH_HAS_MPI
2132  MPI_Helpers::finalize();
2133 #endif
2134 } // End of main
Entry flow problem in quarter tube domain.
Definition: mesh_from_tetgen_navier_stokes.cc:56
Definition: mixed_order_petrov_galerkin_space_time_block_preconditionable_elements.h:52
void set_directory(const std::string &directory)
Definition: oomph_utilities.cc:298
std::ostream *& stream_pt()
Access function for the stream pointer.
Definition: oomph_definitions.h:464
OutputModifier *& output_modifier_pt()
Access function for the output modifier pointer.
Definition: oomph_definitions.h:476
double Amplitude_target
Definition: space_time_oscillating_cylinder.cc:488
unsigned N_re_step
Definition: space_time_oscillating_cylinder.cc:539
double Amplitude
Amplitude of the cylinder motion.
Definition: extrude_with_macro_element_representation.cc:254
unsigned N_amplitude_step
The number of steps used to reach the target amplitude.
Definition: space_time_oscillating_cylinder.cc:491
double Period_ratio
The ratio T_e/T_s.
Definition: flow_past_oscillating_cylinder.cc:212
double Re
Reynolds number.
Definition: extrude_triangle_generated_mesh.cc:48
double ReSt
The Womersley number.
Definition: flow_past_oscillating_cylinder.cc:226
DocInfo Doc_info
Helper for documenting.
Definition: extrude_triangle_generated_mesh.cc:57
double Re_target
Reynolds number for unsteady run.
Definition: flow_past_oscillating_cylinder.cc:220
std::string Red
Definition: oomph_utilities.cc:71
std::string Reset
Definition: oomph_utilities.cc:77
Nullstream oomph_nullstream
Single (global) instantiation of the Nullstream.
Definition: oomph_definitions.cc:313
OutputModifier default_output_modifier
Single global instatiation of the default output modifier.
Definition: oomph_definitions.cc:325
OomphInfo oomph_info
Definition: oomph_definitions.cc:319
double timer
Definition: oomph_metis_from_parmetis_3.1.1/struct.h:210
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References GlobalParameters::Amplitude, GlobalParameters::Amplitude_target, oomph::default_output_modifier, GlobalParameters::Doc_info, GlobalParameters::N_amplitude_step, GlobalParameters::N_re_step, oomph::oomph_info, oomph::oomph_nullstream, oomph::OomphInfo::output_modifier_pt(), GlobalParameters::Period_ratio, problem, GlobalParameters::Re, GlobalParameters::Re_target, oomph::ANSIEscapeCode::Red, oomph::ANSIEscapeCode::Reset, GlobalParameters::ReSt, oomph::DocInfo::set_directory(), and oomph::OomphInfo::stream_pt().