Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Multiphysics 0471
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Denis Louis
Multiphysics 0471
Commits
265b225f
Commit
265b225f
authored
3 years ago
by
Denis Louis
Browse files
Options
Downloads
Patches
Plain Diff
ready for coupling
parent
e4a9024d
No related branches found
Branches containing commit
No related tags found
1 merge request
!7
Coupling
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
srcs/FEM/complex_validation.geo
+0
-55
0 additions, 55 deletions
srcs/FEM/complex_validation.geo
srcs/FEM/my_code.cpp
+165
-179
165 additions, 179 deletions
srcs/FEM/my_code.cpp
with
165 additions
and
234 deletions
srcs/FEM/complex_validation.geo
deleted
100644 → 0
+
0
−
55
View file @
e4a9024d
//THIS CODE DEFINES THE GEOMETRY OF A CLAMPED BAR WITH TWO TYPES OF MESHES, TRIANGULAR AND QUADRANGULAR
Lx = 5;
Ly = 2;
nx = 50;
ny = 20;
Point(1) = {0, 0, 0, 0.1};
Point(2) = {Lx, 0, 0, 0.2};
Point(3) = {Lx, Ly, 0, 0.2};
Point(4) = {0, Ly, 0, 0.1};
Point(5) = {Lx/2, 0, 0, 0.15};
Point(6) = {Lx/2, Ly, 0, 0.15};
Line(1) = {1, 5};
Line(2) = {2, 5};
Line(3) = {3, 2};
Line(4) = {6, 3};
Line(5) = {6, 4};
Line(6) = {4, 1};
Line(7) = {5, 6};
Curve Loop(1) = {1, 7, 5, 6};
Curve Loop(2) = {7, 4, 3, 2};
Plane Surface(1) = {1};
Plane Surface(2) = {2};
//Transfinite Curve {1, 5} = nx+1 Using Progression 1;
//Transfinite Curve {7, 6} = ny+1 Using Progression 1;
//Transfinite Curve {2, 4} = nx+1 Using Progression 1;
//Transfinite Curve {3, 7} = ny+1 Using Progression 1;
//Transfinite Surface {1};
//Transfinite Surface {2};
Mesh.ElementOrder = 2;
Recombine Surface {1}; // quads instead of triangles
Physical Curve("left_edge", 5) = {6};
Physical Surface("domain", 6) = {1, 2}; // the trick is to include both plane surfaces in one single domain
Physical Curve("top_edge", 7) = {4, 5};
Physical Curve("right_edge", 8) = {3};
Physical Point("fixed_node", 9) = {1};
// additional parameters given to the solver
SetNumber("Boundary Conditions/left_edge/ux", 0.); // ALWAYS NEED TO IMPOSE BOTH ux AND uy ON A GIVEN EDGE !! (pas très réaliste, faut y réfléchir)
//SetNumber("Boundary Conditions/left_edge/uy", 0.);
SetNumber("Materials/domain/Young", 210e3);
SetNumber("Materials/domain/Poisson", 0.3);
SetNumber("Materials/domain/rho",7800); //volumic mass of acier
SetNumber("Boundary Conditions/top_edge/tx", 0.); // ALWAYS NEED TO IMPOSE BOTH tx AND ty ON A GIVEN EDGE (realiste, OK) !
SetNumber("Boundary Conditions/top_edge/ty", 0.); //set to some other value for vertical deflection
SetNumber("Boundary Conditions/right_edge/tx", 21e3); //for simple tension conditions
SetNumber("Boundary Conditions/right_edge/ty", 0.);
SetNumber("Volumic Forces/domain/bx",0.);
SetNumber("Volumic Forces/domain/by",0.); //set to -9.81 for gravity
SetNumber("Boundary Conditions/fixed_node/uy",2.);
This diff is collapsed.
Click to expand it.
srcs/FEM/my_code.cpp
+
165
−
179
View file @
265b225f
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment