### Error invalid Ranks in the product, When I run the tutorial in Fenics Navier Stokes

277

views

0

Hello

I am New in Fenics, and I am trying to run the turorial of Navier Stokes Equation, when I writte the weak formulation of the equation I get an error " Invalid ranks 1 and 2 in product.", but I dont know whats is the problem.

The code of variational formulation is given as:

F1 = rho*dot((u-u_n)/ k, v)*dx + rho*dot(dot(u_n, nabla_grad(u_n)),v)*dx + inner (sigma(U, p_n), epsilon(v))*dx

+ dot(p_n*n,v)*ds - dot(mu*nabla_grad(U)*n,v)*ds - dot(f, v)*dx

a1 = lhs(F1)

L1 = rhs(F1)

I appreciate that someone can help me with this ¡¡¡¡

I am New in Fenics, and I am trying to run the turorial of Navier Stokes Equation, when I writte the weak formulation of the equation I get an error " Invalid ranks 1 and 2 in product.", but I dont know whats is the problem.

The code of variational formulation is given as:

F1 = rho*dot((u-u_n)/ k, v)*dx + rho*dot(dot(u_n, nabla_grad(u_n)),v)*dx + inner (sigma(U, p_n), epsilon(v))*dx

+ dot(p_n*n,v)*ds - dot(mu*nabla_grad(U)*n,v)*ds - dot(f, v)*dx

a1 = lhs(F1)

L1 = rhs(F1)

I appreciate that someone can help me with this ¡¡¡¡

Community: FEniCS Project

1

Can you provide a minimal working example such that we can debug. Cf. https://www.allanswered.com/post/emre/read-before-posting-how-do-i-get-by-my-question-answered/

written
9 months ago by
Nate

I agree with Nate. However, the rank 1 rank 2 product error indicates that the variational problem contains both scalar and vector forms; you need to verify that each of the integrals are of identical rank.

written
9 months ago by
pf4d

Please login to add an answer/comment or follow this question.