Dear all,
I am simulating 2D Poiseuille flow through a channel (square) [-1,1]x[-1,1]
with exact solution u_{x} = 1-y^{2} , u_{y} = 0, and p = -2*x +2.
The Neumann boundary condition on the outflow is homogeneous (according to my
calculations).
I have actually have two questions.
1) I have taken Step-22 as is, but have
only adjusted the BoundaryValues function, made an ExactSolution class for
error computation, and adjusted the domain along with the boundary indicators.
I ran a simulation with Dirchlet conditions on the entire boundary. The error
on the velocity looks okay, but the error on the pressure does not. I
understand that, due to the Dirichlet conditions, the pressure may be off by a
constant but the pressure gradient should be correct. According to the exact
solution, the pressure drop should be 4 over the length of the channel in the
x-direction. But according to the .vtk output files, the pressure gradient is
not correct and the pressure drop is actually only 2. I was wondering if
anybody could help. In step-22 I noticed that the definition of the symmetric
gradient has a coefficient of 1/2 in front and I was wondering if this is the
problem ( assuming that my code is not :) ).
Multiplying the first term of the weak form (the symmetric gradient product) of
step-22 by 2 seems to fix the pressure gradient problem, but I would have
thought both symmetric gradients would have to be multiplied by 2 (for this
problem to make sense).
2) My second question is concerning using a constraint matrix to enforce the
mean-value pressure on the outflow to be 0. I have followed the steps in
tutorial 11 and tried to apply them to step-22 for this problem, but am having
an error with the "condense" command (I think). Namely,
An error occurred in line <2259> of file
</home/dbrauss/Desktop/programs/deal.II/lac/include/lac/sparse_matrix.h> in
function
void dealii::SparseMatrix<number>::add(unsigned int, unsigned int, number)
[with number = double]
The violated condition was:
(index != SparsityPattern::invalid_entry) || (value == 0.)
The name and call sequence of the exception was:
ExcInvalidIndex(i, j)
Additional Information:
The entry with index <138,25> does not exist.
Stacktrace:
-----------
#0 ./step-22: dealii::SparseMatrix<double>::add(unsigned int, unsigned int,
double)
#1 ./step-22: dealii::BlockMatrixBase<dealii::SparseMatrix<double>
>::add(unsigned int, unsigned int, double)
#2 /home/dbrauss/Desktop/programs/deal.II/lib/liblac.g.so.6.3.1: void
dealii::ConstraintMatrix::condense<double, dealii::BlockVector<double>
>(dealii::BlockSparseMatrix<double>&, dealii::BlockVector<double>&) const
#3 /home/dbrauss/Desktop/programs/deal.II/lib/liblac.g.so.6.3.1: void
dealii::ConstraintMatrix::condense<double>(dealii::BlockSparseMatrix<double>&)
const
#4 ./step-22: StokesProblem<2>::assemble_system()
#5 ./step-22: StokesProblem<2>::run()
#6 ./step-22: main
I have attached both programs. Thanks for the help.
Dan Brauss
Step1PoisDirichlet.cc.tar.gz
Description: Binary data
Step2AdjConstraint.cc.tar.gz
Description: Binary data
_______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
