30 #include "navier_stokes.h"
33 #include "meshes/tetgen_mesh.h"
37 using namespace oomph;
54 template<
class ELEMENT>
62 const string& node_file_name,
63 const string& element_file_name,
64 const string& face_file_name);
80 void actions_before_newton_solve();
106 template<
class ELEMENT>
108 const string& node_file_name,
109 const string& element_file_name,
110 const string& face_file_name)
121 sprintf(filename,
"boundaries.dat");
122 some_file.open(filename);
123 mesh_pt()->output_boundaries(some_file);
136 unsigned num_nod=
mesh_pt()->nboundary_node(ibound);
137 for (
unsigned inod=0;inod<num_nod;inod++)
139 mesh_pt()->boundary_node_pt(ibound,inod)->pin(1);
140 mesh_pt()->boundary_node_pt(ibound,inod)->pin(2);
151 unsigned num_nod=
mesh_pt()->nboundary_node(ibound);
152 for (
unsigned inod=0;inod<num_nod;inod++)
154 mesh_pt()->boundary_node_pt(ibound,inod)->pin(0);
155 mesh_pt()->boundary_node_pt(ibound,inod)->pin(1);
156 mesh_pt()->boundary_node_pt(ibound,inod)->pin(2);
164 unsigned n_element =
mesh_pt()->nelement();
165 for(
unsigned i=0;i<n_element;i++)
168 ELEMENT* el_pt =
dynamic_cast<ELEMENT*
>(
mesh_pt()->element_pt(i));
176 cout <<
"Number of equations: " << assign_eqn_numbers() << std::endl;
184 template<
class ELEMENT>
190 unsigned num_nod= mesh_pt()->nboundary_node(ibound);
191 for (
unsigned inod=0;inod<num_nod;inod++)
194 mesh_pt()->boundary_node_pt(ibound,inod)->set_value(2,1.0);
204 template<
class ELEMENT>
216 sprintf(filename,
"%s/soln%i.dat",Doc_info.directory().c_str(),
218 some_file.open(filename);
219 mesh_pt()->output(some_file,npts);
235 int main(
int argc,
char* argv[])
239 CommandLineArgs::setup(argc,argv);
244 std::string error_message =
245 "Wrong number of command line arguments.\n";
247 "Must specify the following file names \n";
249 "filename.node then filename.ele then filename.face\n";
251 throw OomphLibError(error_message,
252 OOMPH_CURRENT_FUNCTION,
253 OOMPH_EXCEPTION_LOCATION);
257 string node_file_name(argv[1]);
258 string element_file_name(argv[2]);
259 string face_file_name(argv[3]);
265 doc_info.set_directory(
"RESLT");
269 problem(doc_info,node_file_name,element_file_name,face_file_name);
272 problem.newton_solve();
Entry flow problem in quarter tube domain.
TetgenMesh< ELEMENT > * mesh_pt()
void doc_solution()
Doc the solution.
NavierStokesProblem(DocInfo &doc_info, const string &node_file_name, const string &element_file_name, const string &face_file_name)
Constructor: Pass DocInfo object and file names.
void actions_before_newton_solve()
Update the problem specs before solve.
void actions_after_newton_solve()
Doc the solution after solve.
~NavierStokesProblem()
Destructor (empty)
DocInfo Doc_info
Doc info object.
Unstructured tet mesh based on output from Tetgen: http://wias-berlin.de/software/tetgen/.
int main(int argc, char *argv[])
///////////////////////////////////////////////////////////////////// ///////////////////////////////...
Namespace for physical parameters.
double Re
Reynolds number.
////////////////////////////////////////////////////////////////////// //////////////////////////////...