Hello Keith,

a better way to access the solution values resp. gradients is to use the functions get_function_values resp. get_function_gradients. Then you are sure, that the pressure values are ignored. For more information about these functions you can have a look at the last section of the module "Handling vector-valued problems".

Best Regards,
Markus



Am 20.10.10 01:59, schrieb Keith Brauss:
Just wanted to thank all of you for the help.

I was hoping to ask a question concerning assembly.  I am still a bit
new to dealii (as well as c++) and I am working on
an incompressible Navier-Stokes program for Poiseuille Flow through a
channel in 2d with exact solution
u =<  u_{x} , u_{y}>  =<  1 - y^{2}, 0>  , p = -2x + 2 on the rectangle
[-1,1] X [-1,1], with Dirichlet inflow boundary condition based on the
exact solution and Neuman boundary condition on the outflow.

I am using Newton's method to linearize the system, and I have integrals
of a couple "nonlinear" terms in the (0,0) position of my block system
matrix:  (u_{k} * grad_phi_i) * phi_j  and  (phi_j * grad_u_{k}) * phi_i
.

where u_{k} ( u_k below ) is the solution from the previous iteration.
I am using the
solution vector "solution" as storage of my previous solution (my first
solution is a
Stokes solve) and updating it at each iteration.  At this point I am
keeping
the mesh the same.  It is my understanding that to evaluate these terms
above properly,
I need to retrieve the previous solution's values (coefficients)
associated with the degrees of freedom
for the particular cell.  To do this I use cell->get_dof_indices
(local_dof_indices)

Following along with the format of step-22,
it is my understanding that if I retrieve the previous solution for a
particular cell with coeff[k] = solution[local_dof_indices[k]]
that I will be retrieving the solution associated to each degree of
freedom k of that cell and in particular, I will have the pressure as
well as velocity solution coefficients of the previous iteration.  If
this is right, does the structure of the degrees of freedom in step-22
(where the degrees of freedom are sorted into their respective blocks)
allow me to obtain u_{k} and grad_u_{k}  ( u_k and grad_u_k below) on
the cell at a particular quadrature point by writing the for loops in my
assembly

------------------------

   std::vector<Tensor<2,dim>  >       grad_phi_u (dofs_per_cell);
   std::vector<Tensor<1,dim>  >       phi_u (dofs_per_cell);
   std::vector<double>                     coeffs (dofs_per_cell);
   Tensor<1,dim>                            u_k;
   Tensor<2,dim>                            grad_u_k;

   cell->get_dof_indices (local_dof_indices);

   for (unsigned int k=0; k<dofs_per_cell; ++k)
     coeffs[k] = solution[local_dof_indices[k]];

   for (unsigned int q=0; q<n_q_points; ++q)
   {
     for (unsigned int k=0; k<dofs_per_cell; ++k)
       {
         phi_u[k] = fe_values[velocities].value (k,q);
         grad_phi_u[k] = fe_values[velocities].gradient (k,q);
         u_k = coeffs[k] * phi_u[k];
         grad_u_k = coeffs[k] * grad_phi_u[k];
          .
          .
---------------------------

where the coefficients for the pressure will be "ignored" or is the
organization of the degrees of freedom different from what I am
thinking.  Thanks.


Markus, to answer your question, I am interested in Turek and Schafer's
paper "Recent Benchmark
Computations of Laminar Flow Around a Cylinder".  I think this paper is
from 1996 for flow simulations on high performance computers.  I am
attaching
it.  It has a nice schematic containing the boundary conditions.
Thanks for all the help.

Dan Brauss


Markus Bürg<[email protected]>  10/08/10 12:51 AM>>>
Hello Keith,

for giving some hint on the mesh, you have to provide us with the domain

on which you want to solve the problem. Also for the boundary conditions

it would be helpful to state them, so that we can give more than an
educated guess. So, could you please give us a more detailed discription

of the problem? (Which equations do you want to solve on which domain?
What are the boundary conditions you are imposing?)

Best Regards,
Markus



Am 08.10.10 02:35, schrieb Keith Brauss:
Hello all,

I am interested in solving a incompressible fluid flow (in a piper or
rectangular duct domain) around a cylinder contained within the pipe or
duct domain.  I was wondering if anybody conditions on the cylinder.  Thanks.
Dan Brauss
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii


_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to