Skip to content

Commit adc500f

Browse files
authored
Merge pull request #155 from KratosMultiphysics/PR_conv_diff_3d
[IgaApplication] 3d laplacian problem sbm
2 parents 305716a + 51fed97 commit adc500f

File tree

8 files changed

+169251
-1
lines changed

8 files changed

+169251
-1
lines changed

iga/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Iga Examples
22

33
## Use Cases
4-
- [External Boundary Circle (NURBS) ](https://github.com/KratosMultiphysics/Examples/blob/master/iga/use_cases/external_boundary_cirle_with_nurbs/README.md)
4+
- [External Boundary Circle (NURBS)](https://github.com/KratosMultiphysics/Examples/blob/master/iga/use_cases/external_boundary_circle_with_nurbs/README.md)
55
- [IGA Single-Patch Shell in Membrane Action with Weak Supports and Line Load](https://github.com/KratosMultiphysics/Examples/blob/master/iga/use_cases/iga_shell_3p_single_patch/README.md)
6+
- [3D Laplacian on an Embedded Cube with SBM](https://github.com/KratosMultiphysics/Examples/blob/master/iga/use_cases/laplacian_3d_cube_sbm/README.md)
67

78
## Validation Cases
89

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"problem_data": {
3+
"problem_name": "laplacian_3d_stanford_bunny",
4+
"echo_level": 1,
5+
"parallel_type": "OpenMP",
6+
"start_time": 0.0,
7+
"end_time": 1.0
8+
},
9+
"solver_settings": {
10+
"solver_type": "stationary",
11+
"analysis_type": "non_linear",
12+
"model_part_name": "IgaModelPart",
13+
"domain_size": 3,
14+
"model_import_settings": {
15+
"input_type": "use_input_model_part"
16+
},
17+
"material_import_settings": {
18+
"materials_filename": "materials.json"
19+
},
20+
"linear_solver_settings": {
21+
"solver_type": "skyline_lu_factorization"
22+
},
23+
"skip_entities_replace_and_check": true,
24+
"line_search": false,
25+
"echo_level": 1,
26+
"compute_reactions": false,
27+
"max_iteration": 3,
28+
"solution_relative_tolerance": 1e-14,
29+
"solution_absolute_tolerance": 1e-14,
30+
"residual_relative_tolerance": 1e-14,
31+
"residual_absolute_tolerance": 1e-14,
32+
"time_stepping": {
33+
"time_step": 1e20
34+
}
35+
},
36+
"modelers": [
37+
{
38+
"modeler_name": "import_mdpa_modeler",
39+
"kratos_module": "KratosMultiphysics",
40+
"Parameters": {
41+
"input_filename": "bunny",
42+
"model_part_name": "initial_skin_model_part_out"
43+
}
44+
},
45+
{
46+
"modeler_name": "NurbsGeometryModelerSbm",
47+
"Parameters": {
48+
"model_part_name": "IgaModelPart",
49+
"lower_point_xyz": [0.0, 0.0, 0.0],
50+
"upper_point_xyz": [2.0, 2.0, 2.0],
51+
"lower_point_uvw": [0.0, 0.0, 0.0],
52+
"upper_point_uvw": [2.0, 2.0, 2.0],
53+
"polynomial_order": [2, 2, 2],
54+
"number_of_knot_spans": [40, 40, 40],
55+
"lambda_outer": 1.0,
56+
"lambda_inner": 0.5,
57+
"number_of_inner_loops": 0,
58+
"skin_model_part_outer_initial_name": "initial_skin_model_part_out",
59+
"skin_model_part_name": "skin_model_part"
60+
}
61+
},
62+
{
63+
"modeler_name": "IgaModelerSbm",
64+
"Parameters": {
65+
"echo_level": 0,
66+
"skin_model_part_name": "skin_model_part",
67+
"analysis_model_part_name": "IgaModelPart",
68+
"element_condition_list": [
69+
{
70+
"geometry_type": "GeometryVolume",
71+
"iga_model_part": "ConvectionDiffusionDomain",
72+
"type": "element",
73+
"name": "LaplacianElement",
74+
"shape_function_derivatives_order": 2
75+
},
76+
{
77+
"geometry_type": "SurfaceEdge",
78+
"iga_model_part": "SBM_Support_outer",
79+
"type": "condition",
80+
"name": "SbmLaplacianConditionDirichlet",
81+
"shape_function_derivatives_order": 10,
82+
"sbm_parameters": {
83+
"is_inner": false
84+
}
85+
}
86+
]
87+
}
88+
}
89+
],
90+
"processes": {
91+
"additional_processes": [
92+
{
93+
"python_module": "assign_iga_external_conditions_process",
94+
"kratos_module": "KratosMultiphysics.IgaApplication",
95+
"process_name": "AssignIgaExternalConditionsProcess",
96+
"Parameters": {
97+
"echo_level": 0,
98+
"model_part_name": "IgaModelPart",
99+
"element_condition_list": [
100+
{
101+
"iga_model_part": "IgaModelPart.ConvectionDiffusionDomain",
102+
"variables": [
103+
{
104+
"variable_name": "HEAT_FLUX",
105+
"value": "sin(x) * sinh(y) * cos(z)"
106+
}
107+
]
108+
},
109+
{
110+
"iga_model_part": "IgaModelPart.SBM_Support_outer",
111+
"variables": [
112+
{
113+
"variable_name": "TEMPERATURE",
114+
"value": "sin(x) * sinh(y) * cos(z)"
115+
}
116+
]
117+
}
118+
]
119+
}
120+
}
121+
],
122+
"dirichlet_process_list": [
123+
{
124+
"kratos_module": "KratosMultiphysics",
125+
"python_module": "assign_scalar_variable_to_nodes_process",
126+
"Parameters": {
127+
"model_part_name": "skin_model_part.outer",
128+
"variable_name": "TEMPERATURE",
129+
"value": "sin(x) * sinh(y) * cos(z)"
130+
}
131+
}
132+
],
133+
"constraints_process_list": []
134+
},
135+
"output_processes": {
136+
"output_process_list": []
137+
}
138+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Use Case IGA - 3D Laplacian on the Stanford Bunny with SBM
2+
3+
Short description
4+
5+
This example solves a stationary 3D Laplacian problem with the Surrogate Boundary Method (SBM) in the IGA Application. The embedded boundary is the Stanford bunny imported from `bunny.mdpa`, while the analysis is carried out on a structured background NURBS volume.
6+
7+
The manufactured solution used for validation is:
8+
9+
`T(x, y, z) = sin(x) * sinh(y) * cos(z)`
10+
11+
The same field is prescribed on the surrogate boundary, and the corresponding volumetric term is assigned through `HEAT_FLUX`.
12+
13+
Files
14+
- `ProjectParameters.json`
15+
- `materials.json`
16+
- `bunny.mdpa`
17+
- `run_and_post.py`
18+
- `convergence.py`
19+
- `plot_conditions.py`
20+
21+
Geometry
22+
- `import_mdpa_modeler` loads the Stanford bunny skin into `initial_skin_model_part_out`.
23+
- `NurbsGeometryModelerSbm` creates the background volume on `[0, 2]^3` with order `[2, 2, 2]` and a structured knot-span grid.
24+
- `IgaModelerSbm` creates:
25+
- `LaplacianElement` on `IgaModelPart.ConvectionDiffusionDomain`
26+
- `SbmLaplacianConditionDirichlet` on `IgaModelPart.SBM_Support_outer`
27+
28+
Solver
29+
- Stationary convection-diffusion analysis
30+
- 3D Laplacian formulation
31+
- SBM Dirichlet condition with `PENALTY_FACTOR = -1`
32+
- Linear solver: `skyline_lu_factorization`
33+
34+
Run
35+
36+
```bash
37+
python3 run_and_post.py
38+
python3 convergence.py
39+
python3 plot_conditions.py
40+
```
41+
42+
`run_and_post.py` runs the analysis, prints the absolute and normalized L2 errors, and plots the error distribution at the element integration points.
43+
44+
`convergence.py` performs a mesh-refinement study by changing the number of knot spans of the background NURBS volume.
45+
46+
`plot_conditions.py` initializes the model and plots the outer surrogate boundary in 3D using three gray tones according to the face orientation.

0 commit comments

Comments
 (0)