Stokes alpha-model
Hello all !
I want to solve the stokes alpha equation, which is basically the stokes equation (momentum equation + incompressibility for the velocity v) with in addition the definition of a filtered velocity u: v = (1-alpha² nabla²)u where alpha in a constant.
To do so, I defined 3 trial and 3 test functions corresponding to the velocity v, the filtered velocity u, and the pressure p:
V = VectorFunctionS
U = VectorFunctionS
Q = FunctionSpace(mesh, "CG", 1, constrained_
W = MixedFunctionSp
1) When I defined W = V * U * Q in stead of with MixedFunctionSpace, I have a problem with the dirichlet boundary condition (no-slip condition for u and v) which I defined with the following lines:
zero = Expression(
bc1 = DirichletBC(
bc2 = DirichletBC(
I get:
*** Error: Unable to create Dirichlet boundary condition.
*** Reason: Illegal value dimension (2), expecting (4).
*** Where: This error was encountered inside DirichletBC.cpp.
*** Process: 0
Which I can solve with:
zero = Expression(
bc1 = DirichletBC(
But then, what W.sub(0).sub(1) does ? Is the no slip condition applied to v and u ?
2) To solve my problem, i set:
(v, u, p) = TrialFunction(W)
(w, m, q) = TestFunction(W)
and after defining a and L, I assemble my system and solve it for a function S =Function(W). Then, I want to split S to obtain v, u and p. Unfortunately, I have this message error:
(v, u, p) = TrialFunction(W)
ValueError: too many values to unpack
Is it possible to define 3 Trial/Test Functions ?
I would welcome any answers or suggestions,
Thanks a lot for your help !
Regards
--Coraline
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Coraline Faurie
- Solved:
- Last query:
- Last reply: