navier_stokes/navier_stokes_with_singularity/driven_cavity.cc File Reference

Classes

class  MyTaylorHoodElement
 
class  RectangularDrivenCavityProblem< ELEMENT >
 Driven cavity problem in rectangular domain. More...
 

Namespaces

 Global_Physical_Variables
 Global variables.
 
 Global_Parameters
 Namespace for global parameters.
 

Functions

double Global_Parameters::blend (const Vector< double > &x, const Vector< double > &x_c)
 Blend function, centred at x_c. More...
 
Vector< doubleGlobal_Parameters::grad_blend (const Vector< double > &x, const Vector< double > &x_c)
 Gradient of blend function, centred at x_c. More...
 
Vector< doubleGlobal_Parameters::velocity_couette (const Vector< double > &x)
 Couette flow. More...
 
double Global_Parameters::pressure_couette (const Vector< double > &x)
 Couette Pressure. More...
 
void Global_Parameters::exact_couette (const Vector< double > &x, Vector< double > &soln)
 Combined exact solution (u,v,p) More...
 
Vector< doubleGlobal_Parameters::velocity_pseudo_singularity_for_couette (const Vector< double > &x)
 Pseudo_singularity for computation of Couette flow. More...
 
Vector< Vector< double > > Global_Parameters::grad_velocity_pseudo_singularity_for_couette (const Vector< double > &x)
 Pseudo_singularity for computation of Couette flow: grad[i][j] = du_i/dx_j. More...
 
double Global_Parameters::pressure_pseudo_singularity_for_couette (const Vector< double > &x)
 Pseudo_singularity for computation of Couette flow. More...
 
Vector< doubleGlobal_Parameters::blended_velocity_pseudo_singularity_for_couette (const Vector< double > &x)
 Blended Pseudo_singularity for computation of Couette flow. More...
 
Vector< Vector< double > > Global_Parameters::blended_grad_velocity_pseudo_singularity_for_couette (const Vector< double > &x)
 
double Global_Parameters::blended_pressure_pseudo_singularity_for_couette (const Vector< double > &x)
 Blended Pseudo_singularity for computation of Couette flow. More...
 
Vector< doubleGlobal_Parameters::velocity_singularity1 (const Vector< double > &x)
 Function that computes the fitting velocity solution near the corner (0,0) More...
 
Vector< doubleGlobal_Parameters::velocity_singularity2 (const Vector< double > &x)
 Function that computes the fitting velocity solution near the corner (1,0) More...
 
Vector< Vector< double > > Global_Parameters::grad_velocity_singularity1 (const Vector< double > &coord)
 
Vector< Vector< double > > Global_Parameters::grad_velocity_singularity2 (const Vector< double > &coord)
 
double Global_Parameters::pressure_singularity1 (const Vector< double > &x)
 Function that computes the fitting pressure solution near the corner (0,0) More...
 
double Global_Parameters::pressure_singularity2 (const Vector< double > &x)
 Function that computes the fitting pressure solution near the corner (1,0) More...
 
Vector< doubleGlobal_Parameters::grad_pressure_singularity1 (const Vector< double > &coord)
 
void Global_Parameters::analytic_solution1 (const Vector< double > &x, Vector< double > &solution)
 Function that computes the fitting solutions near the corner (0,0) More...
 
void Global_Parameters::analytic_solution2 (const Vector< double > &x, Vector< double > &solution)
 Function that computes the fitting solutions near the corner (1,0) More...
 
int main (int argc, char **argv)
 

Variables

unsigned Global_Parameters::Element_multiplier = 1
 
unsigned Global_Parameters::N_x =10
 
unsigned Global_Parameters::N_y =10
 
double Global_Parameters::L_x =1.0
 
double Global_Parameters::L_y =1.0
 
unsigned Global_Parameters::Direction = 1
 
double Global_Parameters::R_blend_inner =0.2
 Inner blending radius. More...
 
double Global_Parameters::R_blend_outer =0.8
 Outer blending radius. More...
 
double Global_Parameters::A_couette =1.0
 Amplitude of linearly varying part. More...
 
double Global_Parameters::B_couette =1.0
 Amplitude of singular part. More...
 
Vector< doubleGlobal_Parameters::X_c_couette (2, 0.0)
 Random center for blended couette pseudo singularity. More...
 

Function Documentation

◆ main()

int main ( int argc  ,
char **  argv 
)

///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// Driver for RectangularDrivenCavity test problem – test drive with two different types of element.

1759 {
1760 
1761 #ifdef OOMPH_HAS_MPI
1762 
1763  MPI_Helpers::init(argc,argv);
1764 
1765 #endif
1766 
1767 
1768  // Store command line arguments
1769  CommandLineArgs::setup(argc,argv);
1770 
1771  // Define possible command line arguments and parse the ones that
1772  // were actually specified
1773 
1774  // Use blending?
1776 
1777  // Multiplier for elements
1779  "--element_multiplier",
1781 
1782  // Multiplier for elements
1784  "--re",
1786 
1787  // Use higher order integration scheme?
1789  "--use_high_order_integration_scheme");
1790 
1791  // Parse command line
1793 
1794  // Doc what has actually been specified on the command line
1796 
1797 
1798  // Check singularities and their gradients
1799  {
1800  ofstream some_file;
1801  some_file.open("u_sing.dat");
1802  unsigned nplot=100;
1803  some_file << "ZONE I=" << nplot << ", J=" << nplot << std::endl;
1804  Vector<double> x(2);
1805  for (unsigned i=0;i<nplot;i++)
1806  {
1807  x[0]=double(i)/double(nplot-1);
1808  for (unsigned j=0;j<nplot;j++)
1809  {
1810  x[1]=double(j)/double(nplot-1);
1811 
1812  // Get veloc
1813  //Vector<double> u=Global_Parameters::velocity_singularity1(x);
1814  //Vector<Vector<double> > grad_u=Global_Parameters::grad_velocity_singularity1(x);
1815 
1816  //Vector<double> u=Global_Parameters::velocity_singularity2(x);
1817  //Vector<Vector<double> > grad_u=Global_Parameters::grad_velocity_singularity2(x);
1818 
1821 
1822  some_file << x[0] << " " << x[1] << " "
1823  << u[0] << " " << u[1] << " "
1824  << grad_u[0][0] << " " << grad_u[0][1] << " "
1825  << grad_u[1][0] << " " << grad_u[1][1] << " "
1826  << std::endl;
1827  }
1828  }
1829  some_file.close();
1830  }
1831 
1832 
1833  // Set up doc info
1834  // ---------------
1835 
1836  // Label for output
1837  DocInfo doc_info;
1838 
1839  // Set output directory
1840  doc_info.set_directory("RESLT");
1841 
1842 
1843 
1844 #ifdef DONT_USE_SINGULARITY
1845 
1846  // Build the problem with QTaylorHoodElements
1848 
1849 #else
1850 
1851  // Build the problem with singular QTaylorHoodElements
1854 
1855 #endif
1856 
1857  // Solve the problem
1858  problem.newton_solve();
1859 
1860  // Outpt the solution
1861  problem.doc_solution(doc_info);
1862 
1863  // Step number
1864  doc_info.number()++;
1865 
1866 
1867 } // end_of_main
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Driven cavity problem in rectangular domain.
Definition: linear_solvers/driven_cavity.cc:77
Definition: oomph_utilities.h:499
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
Overload TaylorHood element to modify output.
Definition: pressure_driven_torus.cc:98
Definition: navier_stokes_elements_with_singularity.h:491
void setup(Time *time_pt)
Create all GeomObjects needed to define the cylinder and the flag.
Definition: turek_flag_non_fsi.cc:277
Vector< Vector< double > > blended_grad_velocity_pseudo_singularity_for_couette(const Vector< double > &x)
Definition: navier_stokes/navier_stokes_with_singularity/driven_cavity.cc:398
Vector< double > blended_velocity_pseudo_singularity_for_couette(const Vector< double > &x)
Blended Pseudo_singularity for computation of Couette flow.
Definition: navier_stokes/navier_stokes_with_singularity/driven_cavity.cc:381
unsigned Element_multiplier
Definition: navier_stokes/navier_stokes_with_singularity/driven_cavity.cc:180
double Re
Reynolds number.
Definition: fibre.cc:55
void specify_command_line_flag(const std::string &command_line_flag, const std::string &doc)
Specify possible argument-free command line flag.
Definition: oomph_utilities.cc:451
void parse_and_assign(int argc, char *argv[], const bool &throw_on_unrecognised_args)
Definition: oomph_utilities.cc:760
void doc_specified_flags()
Document specified command line flags.
Definition: oomph_utilities.cc:610
list x
Definition: plotDoE.py:28
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References Global_Parameters::blended_grad_velocity_pseudo_singularity_for_couette(), Global_Parameters::blended_velocity_pseudo_singularity_for_couette(), oomph::CommandLineArgs::doc_specified_flags(), Global_Parameters::Element_multiplier, i, j, oomph::DocInfo::number(), oomph::CommandLineArgs::parse_and_assign(), problem, Global_Physical_Variables::Re, oomph::DocInfo::set_directory(), Flag_definition::setup(), oomph::CommandLineArgs::specify_command_line_flag(), and plotDoE::x.