Driver for PolarNS test problem – test drive with two different types of element.
790 cout << endl <<
"# xmesh: " <<
xmesh <<
" ymesh: " <<
ymesh << endl;
795 cout << endl <<
"Prestart solving for Re: " <<
Re << endl << endl;
798 problem.doc_solution(doc_info);
809 problem.doc_solution(doc_info);
820 static_cast<ARPACK*
>(
problem.eigen_solver_pt() ) -> set_shift( 0.4 );
823 cout <<
"facking" << endl;
824 problem.solve_eigenproblem(n_eval,eigenvalues,eigenvectors);
825 for(
unsigned k=0;
k<n_eval;
k++) cout <<
"eigenvalue: " << eigenvalues[
k] << endl;
826 cout <<
"arpack" << endl;
833 problem.get_symmetry(symmetry,norm);
835 ofstream
out(
"scrap_up.dat");
836 out <<
"# Output { Re, Alpha, Int du_dphi(-1), Int du_dphi(1), Delta_Shear_Stress, Jacobian sign }" << endl;
837 out <<
"# Radius ratio: " <<
R_l <<
" xmesh: " <<
xmesh <<
" ymesh " <<
ymesh << endl;
838 out <<
"# Alpha = " <<
Alpha << endl;
842 out <<
"# Pin v at inlet: " <<
pinv << endl;
843 out <<
"# Using symmetry for pitchfork solve: " << sym << endl << endl;
848 cout << endl <<
"Using symmetry vector from get_symmetry routine. Re = " <<
Re << endl << endl;
853 cout << endl <<
"Using eigenvector for pitchfork detection. Re = " <<
Re << endl << endl;
861 unsigned long n_dof =
problem.ndof();cout <<
"ndof: " << n_dof << endl;
864 unsigned long half=(n_dof/2)-1;
865 cout <<
"According to dofs Re is: " <<
problem.dof(half)
866 <<
" and slack parameter is: " <<
problem.dof(n_dof-1) << endl;
868 double slack=
problem.dof(n_dof-1);
870 problem.deactivate_bifurcation_tracking();
873 problem.doc_solution(doc_info);
874 problem.get_shear_stress(shear_stress);
875 cout <<
"Shear stress is: Lower = " << shear_stress[0] <<
" Upper = " << shear_stress[1]
876 <<
" Delta = " << (shear_stress[0]+shear_stress[1]) << endl;
878 cout << endl <<
"Pitchfork detected at Re = " <<
Re <<
" and Alpha = " <<
Alpha << endl;
879 cout <<
"========================================================" << endl;
881 out <<
Re <<
" " <<
Alpha <<
" " << shear_stress[0] <<
" " << shear_stress[1] <<
" "
882 << (shear_stress[0]+shear_stress[1]) <<
" " << 0 <<
" " << slack << endl;
885 cout <<
"========================================================" << endl;
886 cout << endl <<
"Computing eigenvalue at pitchfork. Re = " <<
Re << endl << endl;
888 problem.solve_eigenproblem(n_eval,eigenvalues,eigenvectors);
889 for(
unsigned k=0;
k<n_eval;
k++) cout <<
"eigenvalue: " << eigenvalues[
k] << endl;
893 problem.store_current_dof_values();
894 problem.pin_boundaries_to_zero();
895 problem.assign_eigenvector_to_dofs( eigenvectors[0] );
896 problem.doc_solution( eigenmode );
900 n_dof =
problem.ndof(); cout <<
"ndof: " << n_dof << endl;
902 problem.get_dofs(soln_at_bifurcation);
910 cout << endl <<
"Adding eigenvector[0] with multiplier " <<
multiplier <<
" to degrees of freedom" << endl;
911 for(
unsigned long d=0;d<n_dof;d++)
918 cout <<
"Adjusting Reynolds number by " <<
epsilon <<
" to Re: " <<
Re
919 <<
" and newton solving" << endl << endl;
921 problem.get_shear_stress(shear_stress);
923 cout <<
"Shear stress is: Lower = " << shear_stress[0] <<
" Upper = " << shear_stress[1]
924 <<
" Delta = " << (shear_stress[0]+shear_stress[1]) << endl;
926 out <<
Re <<
" " <<
Alpha <<
" " << shear_stress[0] <<
" " << shear_stress[1] <<
" " << (shear_stress[0]+shear_stress[1]) <<
" " <<
sign << endl;
932 ds=
problem.arc_length_step_solve( &
Re, ds );
933 cout << endl <<
"Re: " <<
Re << endl;
934 problem.get_shear_stress(shear_stress);
936 cout <<
"Shear stress is: Lower = " << shear_stress[0] <<
" Upper = " << shear_stress[1]
937 <<
" Delta = " << (shear_stress[0]+shear_stress[1]) << endl;
939 out <<
Re <<
" " <<
Alpha <<
" " << shear_stress[0] <<
" " << shear_stress[1] <<
" " << (shear_stress[0]+shear_stress[1]) <<
" " <<
sign << endl;
943 problem.arc_length_step_solve( &
Re, ds );
944 cout << endl <<
"Re: " <<
Re << endl;
945 problem.get_shear_stress(shear_stress);
947 cout <<
"Shear stress is: Lower = " << shear_stress[0] <<
" Upper = " << shear_stress[1]
948 <<
" Delta = " << (shear_stress[0]+shear_stress[1]) << endl;
950 out <<
Re <<
" " <<
Alpha <<
" " << shear_stress[0] <<
" " << shear_stress[1] <<
" " << (shear_stress[0]+shear_stress[1]) <<
" " <<
sign << endl;
955 cout << endl <<
"Computing picture at Re: " <<
Re << endl << endl;
958 problem.doc_solution(doc_info);
959 problem.output_streamfunction(doc_info,
false);
961 problem.get_shear_stress(shear_stress);
963 out <<
Re <<
" " <<
Alpha <<
" " << shear_stress[0] <<
" " << shear_stress[1] <<
" " << (shear_stress[0]+shear_stress[1]) <<
" " <<
sign << endl;
Driven cavity problem in rectangular domain.
Definition: jeffery_hamel.cc:132
Class for the ARPACK eigensolver.
Definition: eigen_solver.h:104
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
Definition: double_vector.h:58
char char char int int * k
Definition: level2_impl.h:374
Global variables.
Definition: TwenteMeshGluing.cpp:60
int ymesh
Definition: jeffery_hamel.cc:62
double multiplier(const Vector< double > &xi)
Definition: disk_oscillation.cc:63
bool pinv
Definition: jeffery_hamel.cc:86
double Rmax_prestart
Definition: jeffery_hamel.cc:71
double epsilon
Definition: jeffery_hamel.cc:76
bool new_outlet_region
Definition: jeffery_hamel.cc:93
double Rstep
Definition: jeffery_hamel.cc:72
bool outlet_traction
Definition: jeffery_hamel.cc:82
int xmesh
Definition: jeffery_hamel.cc:61
double Rstep_prestart
Definition: jeffery_hamel.cc:70
double R_l
Definition: jeffery_hamel.cc:57
double eta_inlet
Definition: jeffery_hamel.cc:80
double Alpha
Scaling factor for wall thickness (to be used in an exercise)
Definition: unsteady_ring.cc:73
bool inlet_traction
Definition: jeffery_hamel.cc:79
double Re
Reynolds number.
Definition: fibre.cc:55
double eta_outlet
Definition: jeffery_hamel.cc:83
double Rmax
Definition: jeffery_hamel.cc:73
T sign(T x)
Definition: cxx11_tensor_builtins_sycl.cpp:172
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213
std::ofstream out("Result.txt")