-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding bead optimization example * objective graph * adding image table * Update README.md step size 0.3 --> 0.15 * Comparison with manual solution * minor fixes * table fixes * Table fixes * Update README.md reordering * Update links for bead example in toplevel Readme files Co-authored-by: Rahul Kikkeri Nagaraja <[email protected]> Co-authored-by: Armin Geiser <[email protected]>
- Loading branch information
1 parent
59490e4
commit 73b209d
Showing
22 changed files
with
1,197 additions
and
176 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Bead Optimization of a Plate | ||
|
||
A bead optimization problem to minimize the strain energy of a square plate - supported at the corners and subject to a single force in the center. | ||
|
||
> **Author**: Armin Geiser | ||
> | ||
> **Kratos version**: 9.0 | ||
## Optimization Problem | ||
|
||
### Objective | ||
- Minimize strain energy | ||
|
||
<p align="center"> | ||
<img src="images/beadOpt_SetupwithBC.png"> | ||
</p> | ||
|
||
## Optimization settings | ||
- Algorithm type : `bead_optimization` | ||
- Number of steps : `300` | ||
- Step size : `0.25` | ||
- Filter radius : `0.075` | ||
- Mesh motion : `False` | ||
|
||
## Results | ||
|
||
### Shape Evolution | ||
The below images shows the shape evolution of the bead pattern on a plate during the optimization iterations. | ||
|
||
<p align="center"> | ||
<img src="images/beadOpt_result.gif" width="800"> | ||
</p> | ||
|
||
### Comparison with manual solutions | ||
|
||
In the table below, a comparison with manual solutions shows that the bead pattern obtained from the optimized solutions perform better. The last row shows the value of the objective function (here strain energy) for each of the bead patterns. | ||
|
||
| Manual Solution 1 | Manual Solution 2 | Manual Solution 3 | Manual Solution 4 | Manual Solution 5 | Optimized Solution | | ||
| :----------------------------------------: | :----------------------------------------: | :----------------------------------------: | :----------------------------------------: | :----------------------------------------: | :-----------------------------------: | | ||
| <img src="images/beadOpt_Manual_1_2D.png"> | <img src="images/beadOpt_Manual_2_2D.png"> | <img src="images/beadOpt_Manual_3_2D.png"> | <img src="images/beadOpt_Manual_4_2D.png"> | <img src="images/beadOpt_Manual_5_2D.png"> | <img src="images/beadOpt_Opt_2D.png"> | | ||
| <img src="images/beadOpt_Manual_1_3D.png"> | <img src="images/beadOpt_Manual_2_3D.png"> | <img src="images/beadOpt_Manual_3_3D.png"> | <img src="images/beadOpt_Manual_4_3D.png"> | <img src="images/beadOpt_Manual_5_3D.png"> | <img src="images/beadOpt_Opt_3D.png"> | | ||
| 2.46e-3 | 1.56e-3 | 1.17e-3 | 1.06e-3 | 7.86e-4 | 4.23e-4 | | ||
|
||
### Convergence | ||
The below plots shows the evolution of the objective function over the bead optimization iterations. | ||
|
||
<p align="center"> | ||
<img src="images/beadOpt_plot.svg" height="650"> | ||
</p> |
262 changes: 157 additions & 105 deletions
262
shape_optimization/06_bead_optimization_plate/analysis_parameters.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,108 +1,160 @@ | ||
{ | ||
"problem_data" : { | ||
"problem_name" : "Plate", | ||
"parallel_type" : "OpenMP", | ||
"start_time" : 0.0, | ||
"end_time" : 1.0, | ||
"echo_level" : 0 | ||
}, | ||
"solver_settings" : { | ||
"solver_type" : "static", | ||
"echo_level" : 0, | ||
"analysis_type" : "linear", | ||
"model_part_name" : "plate", | ||
"domain_size" : 3, | ||
"time_stepping" : { | ||
"time_step" : 1.0 | ||
}, | ||
"model_import_settings" : { | ||
"input_type" : "use_input_model_part", | ||
"input_filename" : "plate" | ||
}, | ||
"material_import_settings" :{ | ||
"materials_filename": "2D_material.json" | ||
}, | ||
"line_search" : false, | ||
"convergence_criterion" : "residual_criterion", | ||
"displacement_relative_tolerance" : 0.0001, | ||
"displacement_absolute_tolerance" : 1e-9, | ||
"residual_relative_tolerance" : 0.0001, | ||
"residual_absolute_tolerance" : 1e-9, | ||
"max_iteration" : 10, | ||
"linear_solver_settings" : { | ||
"solver_type" : "ExternalSolversApplication.super_lu", | ||
"scaling" : false, | ||
"verbosity" : 0 | ||
}, | ||
"rotation_dofs" : true | ||
}, | ||
"processes": { | ||
"constraints_process_list" : [{ | ||
"python_module" : "assign_vector_variable_process", | ||
"kratos_module" : "KratosMultiphysics", | ||
"help" : "This process fixes the selected components of a given vector variable", | ||
"process_name" : "AssignVectorVariableProcess", | ||
"Parameters" : { | ||
"mesh_id" : 0, | ||
"model_part_name" : "plate.corner_points", | ||
"variable_name" : "DISPLACEMENT", | ||
"value" : [0.0,0.0,0.0] | ||
} | ||
"problem_data": { | ||
"problem_name": "Plate", | ||
"parallel_type": "OpenMP", | ||
"start_time": 0.0, | ||
"end_time": 1.0, | ||
"echo_level": 0 | ||
}, | ||
{ | ||
"python_module" : "assign_vector_variable_process", | ||
"kratos_module" : "KratosMultiphysics", | ||
"help" : "This process fixes the selected components of a given vector variable", | ||
"process_name" : "AssignVectorVariableProcess", | ||
"Parameters" : { | ||
"mesh_id" : 0, | ||
"model_part_name" : "plate.corner_points", | ||
"variable_name" : "ROTATION", | ||
"value" : [0.0,0.0,0.0] | ||
} | ||
}], | ||
"loads_process_list" : [{ | ||
"python_module" : "assign_vector_by_direction_process", | ||
"kratos_module" : "KratosMultiphysics", | ||
"process_name" : "AssignVectorByDirectionProcess", | ||
"Parameters" : { | ||
"mesh_id" : 0, | ||
"model_part_name" : "plate.load_point", | ||
"variable_name" : "POINT_LOAD", | ||
"modulus" : 100.0, | ||
"constrained" : false, | ||
"direction" : [0.0,0.0,-1.0] | ||
} | ||
}] | ||
}, | ||
"output_processes" : { | ||
"gid_output" : [{ | ||
"python_module" : "gid_output_process", | ||
"kratos_module" : "KratosMultiphysics", | ||
"process_name" : "GiDOutputProcess", | ||
"help" : "This process writes postprocessing files for GiD", | ||
"Parameters" : { | ||
"model_part_name" : "plate", | ||
"output_name" : "plate", | ||
"postprocess_parameters" : { | ||
"result_file_configuration" : { | ||
"gidpost_flags" : { | ||
"GiDPostMode" : "GiD_PostBinary", | ||
"WriteDeformedMeshFlag" : "WriteDeformed", | ||
"WriteConditionsFlag" : "WriteConditions", | ||
"MultiFileFlag" : "SingleFile" | ||
}, | ||
"file_label" : "step", | ||
"output_control_type" : "step", | ||
"output_frequency" : 1, | ||
"body_output" : true, | ||
"node_output" : false, | ||
"skin_output" : false, | ||
"nodal_results" : ["DISPLACEMENT","REACTION","POINT_LOAD","ROTATION"] | ||
}, | ||
"point_data_configuration" : [] | ||
"solver_settings": { | ||
"solver_type": "static", | ||
"echo_level": 0, | ||
"analysis_type": "linear", | ||
"model_part_name": "plate", | ||
"domain_size": 3, | ||
"time_stepping": { | ||
"time_step": 1.0 | ||
}, | ||
"model_import_settings": { | ||
"input_type": "use_input_model_part", | ||
"input_filename": "plate" | ||
}, | ||
"material_import_settings": { | ||
"materials_filename": "2D_material.json" | ||
}, | ||
"line_search": false, | ||
"convergence_criterion": "residual_criterion", | ||
"displacement_relative_tolerance": 0.0001, | ||
"displacement_absolute_tolerance": 1e-9, | ||
"residual_relative_tolerance": 0.0001, | ||
"residual_absolute_tolerance": 1e-9, | ||
"max_iteration": 10, | ||
"linear_solver_settings": { | ||
"solver_type": "EigenSolversApplication.sparse_lu", | ||
"scaling": false, | ||
"verbosity": 0 | ||
}, | ||
"rotation_dofs": true | ||
}, | ||
"processes": { | ||
"constraints_process_list": [ | ||
{ | ||
"python_module": "assign_vector_variable_process", | ||
"kratos_module": "KratosMultiphysics", | ||
"help": "This process fixes the selected components of a given vector variable", | ||
"process_name": "AssignVectorVariableProcess", | ||
"Parameters": { | ||
"mesh_id": 0, | ||
"model_part_name": "plate.corner_points", | ||
"variable_name": "DISPLACEMENT", | ||
"value": [ | ||
0.0, | ||
0.0, | ||
0.0 | ||
] | ||
} | ||
}, | ||
{ | ||
"python_module": "assign_vector_variable_process", | ||
"kratos_module": "KratosMultiphysics", | ||
"help": "This process fixes the selected components of a given vector variable", | ||
"process_name": "AssignVectorVariableProcess", | ||
"Parameters": { | ||
"mesh_id": 0, | ||
"model_part_name": "plate.corner_points", | ||
"variable_name": "ROTATION", | ||
"value": [ | ||
0.0, | ||
0.0, | ||
0.0 | ||
] | ||
} | ||
} | ||
], | ||
"loads_process_list": [ | ||
{ | ||
"python_module": "assign_vector_by_direction_process", | ||
"kratos_module": "KratosMultiphysics", | ||
"process_name": "AssignVectorByDirectionProcess", | ||
"Parameters": { | ||
"mesh_id": 0, | ||
"model_part_name": "plate.load_point", | ||
"variable_name": "POINT_LOAD", | ||
"modulus": 100.0, | ||
"constrained": false, | ||
"direction": [ | ||
0.0, | ||
0.0, | ||
-1.0 | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"output_processes": { | ||
"gid_output": [ | ||
{ | ||
"python_module": "gid_output_process", | ||
"kratos_module": "KratosMultiphysics", | ||
"process_name": "GiDOutputProcess", | ||
"help": "This process writes postprocessing files for GiD", | ||
"Parameters": { | ||
"model_part_name": "plate", | ||
"output_name": "plate", | ||
"postprocess_parameters": { | ||
"result_file_configuration": { | ||
"gidpost_flags": { | ||
"GiDPostMode": "GiD_PostBinary", | ||
"WriteDeformedMeshFlag": "WriteDeformed", | ||
"WriteConditionsFlag": "WriteConditions", | ||
"MultiFileFlag": "SingleFile" | ||
}, | ||
"file_label": "step", | ||
"output_control_type": "step", | ||
"output_frequency": 1, | ||
"body_output": true, | ||
"node_output": false, | ||
"skin_output": false, | ||
"nodal_results": [ | ||
"DISPLACEMENT", | ||
"REACTION", | ||
"POINT_LOAD", | ||
"ROTATION" | ||
] | ||
}, | ||
"point_data_configuration": [] | ||
} | ||
} | ||
} | ||
], | ||
"vtk_output": [ | ||
{ | ||
"python_module": "vtk_output_process", | ||
"kratos_module": "KratosMultiphysics", | ||
"process_name": "VTKOutputProcess", | ||
"help": "This process writes postprocessing files for VTK", | ||
"Parameters": { | ||
"model_part_name": "plate", | ||
"file_format": "binary", | ||
"output_precision": 7, | ||
"output_control_type": "step", | ||
"output_interval": 1.0, | ||
"output_sub_model_parts": false, | ||
"folder_name": "analysis_Results", | ||
"save_output_files_in_folder": true, | ||
"nodal_solution_step_data_variables": [ | ||
"DISPLACEMENT", | ||
"REACTION", | ||
"ROTATION", | ||
"POINT_LOAD" | ||
], | ||
"nodal_data_value_variables": [], | ||
"element_data_value_variables": [], | ||
"condition_data_value_variables": [], | ||
"gauss_point_variables_extrapolated_to_nodes": [], | ||
"gauss_point_variables_in_elements": [] | ||
} | ||
} | ||
} | ||
}] | ||
} | ||
} | ||
] | ||
} | ||
} |
Binary file added
BIN
+357 KB
shape_optimization/06_bead_optimization_plate/images/beadOpt_Manual_1_2D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+157 KB
shape_optimization/06_bead_optimization_plate/images/beadOpt_Manual_1_3D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+360 KB
shape_optimization/06_bead_optimization_plate/images/beadOpt_Manual_2_2D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+173 KB
shape_optimization/06_bead_optimization_plate/images/beadOpt_Manual_2_3D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+338 KB
shape_optimization/06_bead_optimization_plate/images/beadOpt_Manual_3_2D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+179 KB
shape_optimization/06_bead_optimization_plate/images/beadOpt_Manual_3_3D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+392 KB
shape_optimization/06_bead_optimization_plate/images/beadOpt_Manual_4_2D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+177 KB
shape_optimization/06_bead_optimization_plate/images/beadOpt_Manual_4_3D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+367 KB
shape_optimization/06_bead_optimization_plate/images/beadOpt_Manual_5_2D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+172 KB
shape_optimization/06_bead_optimization_plate/images/beadOpt_Manual_5_3D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+450 KB
shape_optimization/06_bead_optimization_plate/images/beadOpt_Opt_2D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+194 KB
shape_optimization/06_bead_optimization_plate/images/beadOpt_Opt_3D.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.09 KB
shape_optimization/06_bead_optimization_plate/images/beadOpt_SetupwithBC.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.