Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MPM] Change application name #135

Merged
merged 5 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ Unit tests should *not* be uploaded to this repository. Please put them in the `
- [Small Box Lagrangian OW](swimming_dem_fluid_interaction/use_cases/PFEMFluid_Element/One_Way/Small_Box_Eulerian_OW/README.md)
- [Small Box Lagrangian TW](swimming_dem_fluid_interaction/use_cases/PFEMFluid_Element/Two_Way/Small_Box_Eulerian_TW/README.md)

## Particle Mechanics
## MPM (Material Point Method)

**Validation**
- [Granular Flow 2D](particle_mechanics/validation/granular_flow_2D/README.md)
- [Cylinder on inclined plane 2D](particle_mechanics/validation/cylinder_on_inclined_plane/README.md)
- [Granular Flow 2D](mpm/validation/granular_flow_2D/README.md)
- [Cylinder on inclined plane 2D](mpm/validation/cylinder_on_inclined_plane/README.md)

## PFEM2

Expand Down
8 changes: 4 additions & 4 deletions particle_mechanics/README.md → mpm/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Particle Mechanics Examples
# Material Point Method (MPM) Examples

This folder contains examples related to the [Particle Mechanics Application](https://github.com/KratosMultiphysics/Kratos/tree/master/applications/ParticleMechanicsApplication) implemented in Kratos-Multiphysics.
This folder contains examples related to the [MPM Application](https://github.com/KratosMultiphysics/Kratos/tree/master/applications/MPMApplication) implemented in Kratos-Multiphysics.

## Instruction
- Please follow the instruction to download and install the latest version of the application and the GiD interface, [here](https://github.com/KratosMultiphysics/Kratos/tree/master/applications/ParticleMechanicsApplication).
- Please follow the instruction to download and install the latest version of the application and the GiD interface, [here](https://github.com/KratosMultiphysics/Kratos/tree/master/applications/MPMApplication).
- At the moment, we only support [GiD](https://www.gidhome.com/) for pre- and post-processing.
- For unit testings of the currently available feature, please visit the [tests](https://github.com/KratosMultiphysics/Kratos/tree/master/applications/ParticleMechanicsApplication/tests) folder in Particle Mechanics Application.
- For unit testings of the currently available feature, please visit the [tests](https://github.com/KratosMultiphysics/Kratos/tree/master/applications/MPMApplication/tests) folder in MPM Application.

## Examples

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Cylinder on inclined plane 2D - comparison between analytical and numerical solution with MPM
**Author:** Philip Franz
**Author:** Philip Franz

**Kratos version:** Development branch. **Expected 9.1**
**Kratos version:** Development branch. **Expected 9.1**

**Source files:** [cylinder_on_inclined_plane_2D](https://github.com/KratosMultiphysics/Examples/tree/master/particle_mechanics/validation/cylinder_on_inclined_plane/source)
**Source files:** [cylinder_on_inclined_plane_2D](https://github.com/KratosMultiphysics/Examples/tree/master/mpm/validation/cylinder_on_inclined_plane/source)



## Case Specification

This is a 2D simulation of a cylinder on an inclined plane. A rotating as well as a frictionless sliding behaviour of the cylinder are regarded subsequently. The simulation is set up according to section 4.5.2 of (Iaconeta, 2019).
This is a 2D simulation of a cylinder on an inclined plane. A rotating as well as a frictionless sliding behaviour of the cylinder are regarded subsequently. The simulation is set up according to section 4.5.2 of (Iaconeta, 2019).
Linear, unstructured, triangular elements with a size of 0.01m are used to initialize the MPs. Three MPs per cell are considered. For the backgroundmesh linear, unstructured, triangular elements with a size of 0.02m are used.
However, in contrast to section 4.5.2 of (Iaconeta, 2019), the inclined plane is modelled by a line with unstructured elements with size 0.01m. On that line a non conforming Dirichlet boundary condition is imposed by using the penalty method based on (Chandra et al., 2021).
However, in contrast to section 4.5.2 of (Iaconeta, 2019), the inclined plane is modelled by a line with unstructured elements with size 0.01m. On that line a non conforming Dirichlet boundary condition is imposed by using the penalty method based on (Chandra et al., 2021).

The following applications of Kratos are used:
- [ParticleMechanicsApplication](https://github.com/KratosMultiphysics/Kratos/tree/master/applications/ParticleMechanicsApplication)
- [MPMApplication](https://github.com/KratosMultiphysics/Kratos/tree/master/applications/MPMApplication)
- [LinearSolversApplication](https://github.com/KratosMultiphysics/Kratos/tree/master/applications/LinearSolversApplication)

The problem geometry as well as the boundary conditions are sketched below. The non conforming boundary condition is respresented by the copper coloured line.
Expand All @@ -28,7 +28,7 @@ A hyper elastic Neo Hookean Plane strain (2D) constitutive law with unit thickne
* Young's modulus (_E_): 200 MPa
* Poisson ratio (_ν_): 0.3

The time step is 0.001 seconds; the total simulation time is 1.0 seconds. The angle (_α_) of the inclined plane is 60°. The penalty-factor is 1e13.
The time step is 0.001 seconds; the total simulation time is 1.0 seconds. The angle (_α_) of the inclined plane is 60°. The penalty-factor is 1e13.

The contact between cylinder and inclined plane is modelled with the option "contact" (see line 53, file *ProjectParameters_contact.json*) in the first and with "slip" in the second case, based on (Chandra et al., 2021). Choosing "contact" leads to a rolling behaviour of the cylinder; "slip" to frictionless sliding.

Expand All @@ -51,7 +51,7 @@ The left image displays the rolling cylinder - modelled with option "contact". T




## References
- Iaconeta, I. (2019). *Discrete-continuum hybrid modelling of flowing and static regimes.* (Ph.D. thesis). Universitat politècnica de Catalunya - Barcelona tech
- Chandra, B., Singer, V., Teschemacher, T., Wüchner, R., Larese, A. (2021) *Nonconforming Dirichlet boundary conditions in implicit material point method by means of penalty augmentation*. Acta Geotech. 16, 2315–2335. https://doi.org/10.1007/s11440-020-01123-3
- Iaconeta, I. (2019). *Discrete-continuum hybrid modelling of flowing and static regimes.* (Ph.D. thesis). Universitat politècnica de Catalunya - Barcelona tech
- Chandra, B., Singer, V., Teschemacher, T., Wüchner, R., Larese, A. (2021) *Nonconforming Dirichlet boundary conditions in implicit material point method by means of penalty augmentation*. Acta Geotech. 16, 2315–2335. https://doi.org/10.1007/s11440-020-01123-3
16 changes: 16 additions & 0 deletions mpm/validation/cylinder_on_inclined_plane/source/MainKratos.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import KratosMultiphysics
from KratosMultiphysics.MPMApplication.mpm_analysis import MPMAnalysis

"""
For user-scripting it is intended that a new class is derived
from MPMAnalysis to do modifications
"""

if __name__ == "__main__":

with open("ProjectParameters_contact.json",'r') as parameter_file:
parameters = KratosMultiphysics.Parameters(parameter_file.read())

model = KratosMultiphysics.Model()
simulation = MPMAnalysis(model,parameters)
simulation.Run()
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"Variables" : {
"THICKNESS" : 1.0,
"PARTICLES_PER_ELEMENT" : 3,
"MATERIAL_POINTS_PER_ELEMENT" : 3,
"DENSITY" : 7800.0,
"YOUNG_MODULUS" : 200000000.0,
"POISSON_RATIO" : 0.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,24 @@
"input_filename" : "cylinder on inclined plane 2d_Grid"
},
"pressure_dofs" : false,
"auxiliary_variables_list" : ["NORMAL","IS_STRUCTURE"]
"auxiliary_variables_list" : ["NODAL_AREA","NORMAL","IS_STRUCTURE"]
},
"processes" : {
"list_other_processes" : [{
"python_module" : "apply_mpm_particle_dirichlet_condition_process",
"kratos_module" : "KratosMultiphysics.ParticleMechanicsApplication",
"kratos_module" : "KratosMultiphysics.MPMApplication",
"Parameters" : {
"model_part_name" : "Background_Grid.Slip2D_Slip_Auto1",
"particles_per_condition": 3,
"material_points_per_condition": 3,
"penalty_factor": 1e13,
"constrained" : "contact",
"option": "flip_normal"
}
}],
"gravity" : [{
"python_module" : "assign_gravity_to_particle_process",
"kratos_module" : "KratosMultiphysics.ParticleMechanicsApplication",
"process_name" : "AssignGravityToParticleProcess",
"python_module" : "assign_gravity_to_material_point_process",
"kratos_module" : "KratosMultiphysics.MPMApplication",
"process_name" : "AssignGravityToMaterialPointProcess",
"Parameters" : {
"model_part_name" : "MPM_Material",
"variable_name" : "MP_VOLUME_ACCELERATION",
Expand All @@ -62,10 +62,10 @@
}]
},
"output_processes" : {
"body_output_process" : [{
"python_module" : "particle_gid_output_process",
"kratos_module" : "KratosMultiphysics.ParticleMechanicsApplication",
"process_name" : "ParticleMPMGiDOutputProcess",
"gid_output_processes" : [{
"python_module" : "mpm_gid_output_process",
"kratos_module" : "KratosMultiphysics.MPMApplication",
"process_name" : "MPMGiDOutputProcess",
"help" : "This process writes postprocessing files for GiD",
"Parameters" : {
"model_part_name" : "MPM_Material",
Expand All @@ -91,8 +91,7 @@
"point_data_configuration" : []
}
}
}],
"grid_output_process" : [{
},{
"python_module" : "gid_output_process",
"kratos_module" : "KratosMultiphysics",
"process_name" : "GiDOutputProcess",
Expand Down Expand Up @@ -121,6 +120,37 @@
"point_data_configuration" : []
}
}
}],
"vtk_output_processes" : [{
"python_module" : "vtk_output_process",
"kratos_module" : "KratosMultiphysics",
"process_name" : "VtkOutputProcess",
"Parameters" : {
"model_part_name" : "Background_Grid",
"output_control_type" : "step",
"output_interval" : 5,
"file_format" : "ascii",
"output_precision" : 7,
"output_sub_model_parts" : false,
"output_path" : "vtk_output",
"save_output_files_in_folder" : true,
"nodal_solution_step_data_variables" : ["DISPLACEMENT","REACTION"]
}
},{
"python_module" : "mpm_vtk_output_process",
"kratos_module" : "KratosMultiphysics.MPMApplication",
"process_name" : "MPMVtkOutputProcess",
"Parameters" : {
"model_part_name" : "MPM_Material",
"output_control_type" : "step",
"output_interval" : 5,
"file_format" : "ascii",
"output_precision" : 7,
"output_sub_model_parts" : false,
"save_output_files_in_folder" : true,
"output_path" : "vtk_output_Body",
"gauss_point_variables_in_elements" : ["MP_VELOCITY","MP_DISPLACEMENT"]
}
}]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,24 @@
"input_filename" : "cylinder on inclined plane 2d_Grid"
},
"pressure_dofs" : false,
"auxiliary_variables_list" : ["NORMAL","IS_STRUCTURE"]
"auxiliary_variables_list" : ["NODAL_AREA","NORMAL","IS_STRUCTURE"]
},
"processes" : {
"list_other_processes" : [{
"python_module" : "apply_mpm_particle_dirichlet_condition_process",
"kratos_module" : "KratosMultiphysics.ParticleMechanicsApplication",
"kratos_module" : "KratosMultiphysics.MPMApplication",
"Parameters" : {
"model_part_name" : "Background_Grid.Slip2D_Slip_Auto1",
"particles_per_condition": 3,
"material_points_per_condition": 3,
"penalty_factor": 1e13,
"constrained" : "slip",
"option": "flip_normal"
}
}],
"gravity" : [{
"python_module" : "assign_gravity_to_particle_process",
"kratos_module" : "KratosMultiphysics.ParticleMechanicsApplication",
"process_name" : "AssignGravityToParticleProcess",
"python_module" : "assign_gravity_to_material_point_process",
"kratos_module" : "KratosMultiphysics.MPMApplication",
"process_name" : "AssignGravityToMaterialPointProcess",
"Parameters" : {
"model_part_name" : "MPM_Material",
"variable_name" : "MP_VOLUME_ACCELERATION",
Expand All @@ -62,10 +62,10 @@
}]
},
"output_processes" : {
"body_output_process" : [{
"python_module" : "particle_gid_output_process",
"kratos_module" : "KratosMultiphysics.ParticleMechanicsApplication",
"process_name" : "ParticleMPMGiDOutputProcess",
"gid_output_processes" : [{
"python_module" : "mpm_gid_output_process",
"kratos_module" : "KratosMultiphysics.MPMApplication",
"process_name" : "MPMGiDOutputProcess",
"help" : "This process writes postprocessing files for GiD",
"Parameters" : {
"model_part_name" : "MPM_Material",
Expand All @@ -91,8 +91,7 @@
"point_data_configuration" : []
}
}
}],
"grid_output_process" : [{
},{
"python_module" : "gid_output_process",
"kratos_module" : "KratosMultiphysics",
"process_name" : "GiDOutputProcess",
Expand Down Expand Up @@ -121,6 +120,37 @@
"point_data_configuration" : []
}
}
}],
"vtk_output_processes" : [{
"python_module" : "vtk_output_process",
"kratos_module" : "KratosMultiphysics",
"process_name" : "VtkOutputProcess",
"Parameters" : {
"model_part_name" : "Background_Grid",
"output_control_type" : "step",
"output_interval" : 5,
"file_format" : "ascii",
"output_precision" : 7,
"output_sub_model_parts" : false,
"output_path" : "vtk_output",
"save_output_files_in_folder" : true,
"nodal_solution_step_data_variables" : ["DISPLACEMENT","REACTION"]
}
},{
"python_module" : "mpm_vtk_output_process",
"kratos_module" : "KratosMultiphysics.MPMApplication",
"process_name" : "MPMVtkOutputProcess",
"Parameters" : {
"model_part_name" : "MPM_Material",
"output_control_type" : "step",
"output_interval" : 5,
"file_format" : "ascii",
"output_precision" : 7,
"output_sub_model_parts" : false,
"save_output_files_in_folder" : true,
"output_path" : "vtk_output_Body",
"gauss_point_variables_in_elements" : ["MP_VELOCITY","MP_DISPLACEMENT"]
}
}]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

**Kratos version:** Development branch. **Expected 6.0**

**Source files:** [granular_flow_2D](https://github.com/KratosMultiphysics/Examples/tree/master/particle_mechanics/validation/granular_flow_2D/source)
**Source files:** [granular_flow_2D](https://github.com/KratosMultiphysics/Examples/tree/master/mpm/validation/granular_flow_2D/source)

## Case Specification

This is a 2D non-cohesive granular material simulation according to the experiment conducted by (Bui et al., 2008). Here, linear structured triangular elements are used to initialize the MPs and as the background mesh. The structured mesh arrangement is chosen to avoid the irregularities of the generated MP’s density, which, by further, improving the numerical solutions.

The following application of Kratos is used:
- [ParticleMechanicsApplication](https://github.com/KratosMultiphysics/Kratos/tree/master/applications/ParticleMechanicsApplication)
- [MPMApplication](https://github.com/KratosMultiphysics/Kratos/tree/master/applications/MPMApplication)

The problem geometry as well as the boundary conditions are sketched below:

Expand All @@ -34,7 +34,7 @@ The problem stated above has been solved with a structured mesh with 3 material

<p align="center">
<img src="data/granular_flow_2D_results.png" alt="Obtained results and comparison." width="700" />

(a.) Experiment conducted by (Bui et al., 2008), (b.) comparison of final surface configuration and failure line, (c.) simulation results of (Bui et al., 2008) by using SPH method, (d.) simulation results obtained by implicit MPM method
</p>

Expand Down
16 changes: 16 additions & 0 deletions mpm/validation/granular_flow_2D/source/MainKratos.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import KratosMultiphysics
from KratosMultiphysics.MPMApplication.mpm_analysis import MPMAnalysis

"""
For user-scripting it is intended that a new class is derived
from MPMAnalysis to do modifications
"""

if __name__ == "__main__":

with open("ProjectParameters.json",'r') as parameter_file:
parameters = KratosMultiphysics.Parameters(parameter_file.read())

model = KratosMultiphysics.Model()
simulation = MPMAnalysis(model,parameters)
simulation.Run()
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"Variables" : {
"THICKNESS" : 1.0,
"PARTICLES_PER_ELEMENT" : 3,
"MATERIAL_POINTS_PER_ELEMENT" : 3,
"DENSITY" : 2650.0,
"YOUNG_MODULUS" : 840000.0,
"POISSON_RATIO" : 0.3,
Expand Down
Loading
Loading