-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* save * adding p-norm to sensor sum * test case * revert files * apply changes suggested by Suneth * Update applications/SystemIdentificationApplication/custom_python/add_custom_sensors_to_python.cpp Co-authored-by: Suneth Warnakulasuriya <[email protected]> * save * adding testing * reverting ref values --------- Co-authored-by: IAntonau <[email protected]> Co-authored-by: Suneth Warnakulasuriya <[email protected]>
- Loading branch information
1 parent
21df993
commit 12643ed
Showing
12 changed files
with
396 additions
and
10 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
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
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
3 changes: 3 additions & 0 deletions
3
...ation/tests/auxiliary_files/system_identification_p_norm/adjoint_material_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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"properties": [] | ||
} |
77 changes: 77 additions & 0 deletions
77
...cation/tests/auxiliary_files/system_identification_p_norm/adjoint_project_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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"problem_data": { | ||
"problem_name": "benchmark_2", | ||
"parallel_type": "OpenMP", | ||
"start_time": 0, | ||
"end_time": 1, | ||
"echo_level": 0 | ||
}, | ||
"sensor_settings": { | ||
"perturbation_size": 1e-8, | ||
"adapt_perturbation_size": true, | ||
"p_coefficient": 4, | ||
"@include_json": "auxiliary_files/system_identification/sensor_data.json" | ||
}, | ||
"solver_settings": { | ||
"solver_type": "adjoint_static", | ||
"analysis_type": "linear", | ||
"model_part_name": "AdjointStructure", | ||
"domain_size": 3, | ||
"time_stepping": { | ||
"time_step": 1.0 | ||
}, | ||
"compute_reactions": false, | ||
"move_mesh_flag": false, | ||
"sensitivity_settings": { | ||
"sensitivity_model_part_name": "all_nodes_elements_model_part", | ||
"element_data_value_sensitivity_variables": [ | ||
"YOUNG_MODULUS" | ||
], | ||
"build_mode": "static" | ||
}, | ||
"echo_level": 0, | ||
"rotation_dofs": true, | ||
"model_import_settings": { | ||
"input_type": "use_input_model_part" | ||
}, | ||
"material_import_settings": { | ||
"materials_filename": "auxiliary_files/system_identification/adjoint_material_parameters.json" | ||
}, | ||
"linear_solver_settings": { | ||
"solver_type": "amgcl" | ||
} | ||
}, | ||
"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": "AdjointStructure.BoundPtsType7", | ||
"variable_name": "ADJOINT_DISPLACEMENT", | ||
"value": [ | ||
0.0, | ||
0.0, | ||
0.0 | ||
], | ||
"constrained": [ | ||
true, | ||
true, | ||
true | ||
], | ||
"interval": [ | ||
0.0, | ||
"End" | ||
] | ||
} | ||
} | ||
], | ||
"loads_process_list": [], | ||
"list_other_processes": [] | ||
}, | ||
"output_processes": {}, | ||
"analysis_stage": "KratosMultiphysics.SystemIdentificationApplication.sensor_sensitivity_solvers.sensor_sensitivity_static_analysis" | ||
} |
133 changes: 133 additions & 0 deletions
133
...plication/tests/auxiliary_files/system_identification_p_norm/optimization_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 |
---|---|---|
@@ -0,0 +1,133 @@ | ||
{ | ||
"problem_data": { | ||
"parallel_type": "OpenMP", | ||
"echo_level": 0 | ||
}, | ||
"model_parts": [ | ||
{ | ||
"type": "mdpa_model_part_controller", | ||
"settings": { | ||
"model_part_name": "AdjointStructure", | ||
"domain_size": 3, | ||
"input_filename": "auxiliary_files/structure" | ||
} | ||
}, | ||
{ | ||
"type": "connectivity_preserving_model_part_controller", | ||
"settings": { | ||
"transformation_settings": [ | ||
{ | ||
"source_model_part_name": "AdjointStructure", | ||
"destination_model_part_name": "Structure", | ||
"destination_element_name": "ShellThinElement3D3N", | ||
"destination_condition_name": "LineLoadCondition3D2N" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"analyses": [ | ||
{ | ||
"name": "Structure_static", | ||
"type": "kratos_analysis_execution_policy", | ||
"settings": { | ||
"model_part_names": [ | ||
"Structure" | ||
], | ||
"analysis_module": "KratosMultiphysics.StructuralMechanicsApplication", | ||
"analysis_type": "StructuralMechanicsAnalysis", | ||
"analysis_settings": { | ||
"@include_json": "auxiliary_files/system_identification/primal_project_parameters.json" | ||
} | ||
} | ||
} | ||
], | ||
"responses": [ | ||
{ | ||
"name": "damage_response", | ||
"type": "damage_detection_response", | ||
"module": "KratosMultiphysics.SystemIdentificationApplication.responses", | ||
"settings": { | ||
"evaluated_model_part_names": [ | ||
"AdjointStructure" | ||
], | ||
"adjoint_parameters": { | ||
"@include_json": "auxiliary_files/system_identification_p_norm/adjoint_project_parameters.json" | ||
}, | ||
"test_analysis_list": [ | ||
{ | ||
"primal_analysis_name": "Structure_static", | ||
"sensor_measurement_csv_file": "auxiliary_files/damaged_problem/measured_data_ref.csv", | ||
"weight": 1.0 | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"controls": [ | ||
{ | ||
"name": "material_control", | ||
"type": "material_properties_control", | ||
"module": "KratosMultiphysics.SystemIdentificationApplication.controls", | ||
"settings": { | ||
"model_part_names": [ | ||
{ | ||
"primal_model_part_name": "Structure", | ||
"adjoint_model_part_name": "AdjointStructure" | ||
} | ||
], | ||
"control_variable_name": "YOUNG_MODULUS", | ||
"control_variable_bounds": [ | ||
0.0, | ||
30000000000.0 | ||
], | ||
"filter_settings": { | ||
"filter_type": "explicit_filter", | ||
"filter_radius_settings": { | ||
"filter_radius": 5.0, | ||
"filter_radius_type": "constant" | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"algorithm_settings": { | ||
"type": "algorithm_steepest_descent", | ||
"settings": { | ||
"echo_level": 0, | ||
"line_search": { | ||
"type": "const_step", | ||
"init_step": 0.01, | ||
"gradient_scaling": "inf_norm" | ||
}, | ||
"conv_settings": { | ||
"type": "max_iter", | ||
"max_iter": 5 | ||
} | ||
}, | ||
"controls": [ | ||
"material_control" | ||
], | ||
"objective": { | ||
"response_name": "damage_response", | ||
"type": "minimization", | ||
"scaling": 1.0 | ||
} | ||
}, | ||
"processes": { | ||
"kratos_processes": {}, | ||
"optimization_data_processes": { | ||
"output_processes": [ | ||
{ | ||
"type": "optimization_problem_ascii_output_process", | ||
"module": "KratosMultiphysics.OptimizationApplication.processes", | ||
"settings": { | ||
"output_file_name": "auxiliary_files/summary_p_norm.csv", | ||
"write_kratos_version": false, | ||
"write_time_stamp": false | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.