OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
app_incompressible_flows.h
Go to the documentation of this file.
1 // ------------------------------------------------------------------------------------------------------------------------------
2 //
3 // FCST: Fuel Cell Simulation Toolbox
4 //
5 // Copyright (C) 2006-2015 by Energy Systems Design Laboratory, University of Alberta
6 //
7 // This software is distributed under the MIT license
8 // For more information, see the README file in /doc/LICENSE
9 //
10 // - Class: app_incompressible_flows.h
11 // - Description: This class deals with steady-state incompressible and isothermal Navier-Stokes
12 // fluid transport applications for a single-phase single-component case
13 //
14 // - Poiseuille - Poiseuille flow (channel) - test
15 // - Couette - Couette flow (channel) - test
16 // - lid_driven_cavity_flow - lid driven cavity flow (channel) - test
17 // - backward_step - flow over backward facing step (channel) - test
18 // - serpentine_incomp - serpentine flow (channel + porous layer) - experiment
19 // - square - flow over square (channel) - test
20 // - sphere - flow over sphere (channel) - test
21 // - DarcyCTest_incomp - Darcy equation convergence test ( porous layer) - test
22 // - ThInPlane_incomp - through-plane & in-plane permeability experiments (channel + porous layer) - experiment
23 // - pore_network_incomp - pore network flow (channel) - study
24 //
25 // - Developers: Valentin N. Zingan, University of Alberta
26 // - Id: $Id$
27 //
28 // ------------------------------------------------------------------------------------------------------------------------------
29 
30 #ifndef _FCST_APPLICATION_APP_INCOMPRESSIBLE_FLOWS_H_
31 #define _FCST_APPLICATION_APP_INCOMPRESSIBLE_FLOWS_H_
32 //-- dealII
33 #include <deal.II/base/function_parser.h>
34 //-- OpenFCST
37 
38 using namespace dealii;
39 using namespace FuelCell::ApplicationCore;
40 
50 namespace FuelCell
51 {
52  namespace InitialAndBoundaryData
53  {
62  template<int dim>
64  {
65  public:
66 
68 
69 
77  InitialDataAppIncompressibleFlows(boost::shared_ptr<ApplicationData> data,
78  const unsigned int n_components = 1);
79 
84 
86 
87  protected:
88 
90 
91 
97  virtual double math_expression(const Point<dim>& point,
98  const unsigned int no_component = 0) const;
99 
101 
102  };
103 
112  template<int dim>
114  {
115  public:
116 
118 
119 
127  ExactSolutionAppIncompressibleFlows(boost::shared_ptr<ApplicationData> data,
128  const unsigned int n_components = 1);
129 
134 
136 
137  protected:
138 
140 
141 
147  virtual double math_expression(const Point<dim>& point,
148  const unsigned int no_component = 0) const;
149 
151 
152  };
153 
154  } // InitialAndBoundaryData
155 
156 } // FuelCell
157 
163 namespace FuelCell
164 {
165  namespace Application
166  {
167 
186  template<int dim>
188  {
189  public:
190 
192 
193 
197  AppIncompressibleFlows( boost::shared_ptr<ApplicationData> data = boost::shared_ptr<ApplicationData>() );
198 
203 
207  virtual void declare_parameters(ParameterHandler& param);
208 
212  virtual void initialize(ParameterHandler& param);
213 
219  virtual void initialize_solution(FEVector& initial_guess,
220  std::shared_ptr< Function<dim> > function = std::shared_ptr< Function<dim> >());
221 
223 
225 
226 
230  virtual void cell_matrix(MatrixVector& cell_matrices,
231  const typename DoFApplication<dim>::CellInfo& cell_info);
232 
236  virtual void cell_residual(FEVector& cell_res,
237  const typename DoFApplication<dim>::CellInfo& cell_info);
238 
242  virtual void bdry_matrix(MatrixVector& bdry_matrices,
243  const typename DoFApplication<dim>::FaceInfo& bdry_info);
244 
248  virtual void bdry_residual(FEVector& bdry_res,
249  const typename DoFApplication<dim>::FaceInfo& bdry_info);
250 
252 
254 
255 
259  virtual void dirichlet_bc(std::map<unsigned int, double>& boundary_values) const;
260 
262 
264 
265 
269  virtual void data_out(const std::string& filename,
270  const FEVectors& src);
271 
279  virtual void compute_L1_L2_error_and_convergence_rate(const FEVector& solution,
280  const unsigned int& refinement_cycle,
281  std::vector< ConvergenceTable >& convergence_tables) const;
282 
284 
285  protected:
286 
288 
289 
295  void make_variable_initial_data(FEVector& initial_guess);
296 
302  void make_variable_boundary_data(FEVector& initial_guess);
303 
305 
307 
308 
315 
320 
325 
330 
335 
350  std::string app_specification;
351 
353 
354  };
355 
356  } // Application
357 
358 } // FuelCell
359 
360 #endif
FuelCellShop::Material::ExperimentalSolid solid
Solid used in porous layer.
Definition: app_incompressible_flows.h:324
This class deals with Navier-Stokes fluid transport equations.
Definition: incompressible_single_component_NS_equations.h:205
This class describes a solid.
Definition: experimental_solid.h:38
FuelCellShop::Layer::ExperimentalPorousLayer< dim > porous_layer
Porous layer.
Definition: app_incompressible_flows.h:334
FuelCellShop::Material::ExperimentalFluid fluid
Fluid used in channel AND/OR porous layer.
Definition: app_incompressible_flows.h:319
FuelCellShop::Layer::Channel< dim > channel
Channel.
Definition: app_incompressible_flows.h:329
FuelCellShop::Equation::IncompressibleSingleComponentNSEquations< dim > fluid_transport_equations
This object describes the equations that we are going to solve here.
Definition: app_incompressible_flows.h:314
This class is a means to make variable initial or boundary data.
Definition: initial_and_boundary_data.h:453
This class is created for the objects handed to the mesh loops.
Definition: mesh_loop_info_objects.h:544
This class deals with steady-state incompressible and isothermal Navier-Stokes fluid transport applic...
Definition: app_incompressible_flows.h:187
This class describes a porous layer and stores pointers to.
Definition: experimental_porous_layer.h:70
std::vector< MatrixBlock< FullMatrix< double > > > MatrixVector
The matrix vector used in the mesh loops.
Definition: matrix_block.h:102
This class is a means to make the exact solution (if available).
Definition: app_incompressible_flows.h:113
This class is a means to make variable initial data.
Definition: app_incompressible_flows.h:63
This class describes a channel and stores pointers to.
Definition: channel.h:51
BlockVector< double > FEVector
The vector class used by applications.
Definition: application_data.h:46
std::string app_specification
Application specification.
Definition: app_incompressible_flows.h:350
The data type used in function calls of Application.
Definition: fe_vectors.h:59
This class describes.
Definition: experimental_fluid.h:44
Application handling matrices and assembling the linear system to solve the sensitivity equations...
Definition: optimization_block_matrix_application.h:49