Skip to content

Add 2D incompressible MMS with Neumann boundary conditions#19

Open
Fimache wants to merge 1 commit into
main-freefem-sofafrom
2d-incompressible
Open

Add 2D incompressible MMS with Neumann boundary conditions#19
Fimache wants to merge 1 commit into
main-freefem-sofafrom
2d-incompressible

Conversation

@Fimache
Copy link
Copy Markdown

@Fimache Fimache commented May 12, 2026

2D manufactured solution for nearly incompressible material; with Neumann BC.

  • Includes error analysis (L2, H1)

Comment on lines +10 to +19
""" l'idee est de tester 3 cas de l'incompressibilite en posant rotation
une mms avec un div u(x,y) = 0,
3 cas seront tester dans ce script :
- cas I : rotation pure : ux = -y ; u_y = x ====> cas non informatif
-cas II : un champ Cisaille : u_x = y , u_y = 0;
- cas III : mms plus realistique : u_x = sin(pi*x)cos(pi*y); u_y = -cos(pi* x)sin(pi*y)

"""
#MMS_TYPE = "realistic" # " rotation" , "cisaille", "realistic"
# l'ajouter apres avoir toutes les fonctions chacune de son cote
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please translate this?

Comment on lines +160 to +161
@staticmethod
def to_triangles(conn):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does the @staticmethod keyword do? Do we need it here?

if dim == "2d":
lam = E * nu / (1 - nu**2)
else:
lam = E * nu / ((1 + nu) * (1 - 2 * nu))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's for dim = 3d and if nu = 0.5 you trigger division by zero. See comment below.

convergence_study(specs, L, E, nu, nx_values, dim=DIM)

DIM = "3d"
for nu in [0.0, 0.3, 0.49, 0.50]:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will trigger the execution of the lame function with nu = 0.5 -> division by zero. See previous comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants