multi_physics/boussinesq_convection/refineable_b_convection.cc File Reference
#include "generic.h"
#include "advection_diffusion.h"
#include "navier_stokes.h"
#include "multi_physics.h"
#include "meshes/rectangular_quadmesh.h"

Classes

class  RefineableConvectionProblem< NST_ELEMENT, AD_ELEMENT >
 

Namespaces

 Global_Physical_Variables
 Global variables.
 

Functions

int main ()
 

Variables

Vector< doubleGlobal_Physical_Variables::Direction_of_gravity (2)
 Gravity vector. More...
 

Function Documentation

◆ main()

int main ( )

Driver code for 2D Boussinesq convection problem with adaptivity.

345 {
346 
347  // Set the direction of gravity
350 
351  // Create the problem with 2D nine-node refineable elements.
354 
355  // Apply a perturbation to the upper boundary condition to
356  // force the solution into the symmetry-broken state.
357  problem.enable_imperfection();
358 
359  //Solve the problem with (up to) two levels of adaptation
360  problem.newton_solve(2);
361 
362  //Document the solution
363  problem.doc_solution();
364 
365  // Make the boundary conditions perfect and solve again.
366  // Now the slightly perturbed symmetry broken state computed
367  // above is used as the initial condition and the Newton solver
368  // converges to the symmetry broken solution, even without
369  // the perturbation
370  problem.disable_imperfection();
371  problem.newton_solve(2);
372  problem.doc_solution();
373 
374 } // end of main
Definition: mpi/multi_domain/boussinesq_convection/multi_domain_ref_b_convection.cc:80
Definition: boussinesq_elements.h:803
Vector< double > Direction_of_gravity(2)
Gravity vector.
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References Global_Physical_Variables::Direction_of_gravity, and problem.