Add 2D incompressible MMS with Neumann boundary conditions#19
Open
Fimache wants to merge 1 commit into
Open
Conversation
th-skam
reviewed
May 21, 2026
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 |
Collaborator
There was a problem hiding this comment.
Can you please translate this?
Comment on lines
+160
to
+161
| @staticmethod | ||
| def to_triangles(conn): |
Collaborator
There was a problem hiding this comment.
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)) |
Collaborator
There was a problem hiding this comment.
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]: |
Collaborator
There was a problem hiding this comment.
This will trigger the execution of the lame function with nu = 0.5 -> division by zero. See previous comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
2D manufactured solution for nearly incompressible material; with Neumann BC.