Skip to content

Commit c8324c3

Browse files
input friction as angle, write coeff
1 parent ce97b47 commit c8324c3

6 files changed

Lines changed: 31 additions & 18 deletions

File tree

kratos.gid/apps/CDEM/write/writeMDPA_Parts.tcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,10 @@ proc DEM::write::writeMaterialsParts { } {
466466
if {$prop in $printable} {
467467
if {$prop eq "ConstitutiveLaw"} {
468468
write::WriteString " DEM_CONTINUUM_CONSTITUTIVE_LAW_NAME $val"
469+
} elseif {$prop eq "FRICTION"} {
470+
set pi 3.1415926535897931
471+
set propvalue [expr {tan($val*$pi/180.0)}]
472+
write::WriteString " FRICTION $propvalue"
469473
} else {
470474
write::WriteString " $prop $val"
471475
}

kratos.gid/apps/CDEM/write/writeMDPA_Walls.tcl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ proc DEM::write::WriteWallProperties { } {
4545
# write::WriteString " $prop $v"
4646
# }
4747
#}
48-
write::WriteString " FRICTION [write::getValueByNode [$group selectNodes "./value\[@n='friction_coeff'\]"]]"
48+
49+
set friction_value [write::getValueByNode [$group selectNodes "./value\[@n='friction_angle'\]"]]
50+
set pi 3.1415926535897931
51+
set propvalue [expr {tan($friction_value*$pi/180.0)}]
52+
write::WriteString " FRICTION $propvalue"
53+
#write::WriteString " FRICTION [write::getValueByNode [$group selectNodes "./value\[@n='friction_coeff'\]"]]"
4954
write::WriteString " WALL_COHESION [write::getValueByNode [$group selectNodes "./value\[@n='WallCohesion'\]"]]"
5055
set compute_wear_bool [write::getValueByNode [$group selectNodes "./value\[@n='DEM_Wear'\]"]]
5156
if {[write::isBooleanTrue $compute_wear_bool]} {

kratos.gid/apps/CDEM/xml/MaterialsC.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<parameter n="PARTICLE_DENSITY" pn="Density" unit_magnitude="Density" units="kg/m^3" v="2500.0" type="double" help="Density of the material (not bulk density)"/>
66
<parameter n="YOUNG_MODULUS" pn="Young Modulus" unit_magnitude="P" units="Pa" v="1.0e5" type="double" help="The Youngs Modulus of the material (not bulk stiffness)"/>
77
<parameter n="POISSON_RATIO" pn="Poisson Ratio" v="0.20" type="double" help="The Poissons Ratio of the material (not bulk Ratio)"/>
8-
<parameter n="FRICTION" pn="Coefficient of friction" v="1.0" type="double" help="Particle friction coefficient (for Coulombs friction)"/>
9-
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.2" type="double" help="Particle friction angle (for Coulombs friction)"/>
8+
<parameter n="FRICTION" pn="Friction angle" v="30.0" type="double" units="deg" unit_magnitude="Angle" help="Particle friction angle (for Coulombs friction)"/>
9+
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.2" type="double" help=""/>
1010
<parameter n="PARTICLE_MATERIAL" pn="Color" v="1" type="integer"/>
1111
<parameter n="ROLLING_FRICTION" pn="Rolling friction" v="0.01" type="double" help="Rolling friction"/>
1212
<parameter n="ROLLING_FRICTION_WITH_WALLS" pn="Rolling friction With Walls" v="0.01" type="double" help="Rolling friction with walls"/>

kratos.gid/apps/DEM/write/writeMDPA_Parts.tcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,10 @@ proc DEM::write::writeMaterialsParts { } {
365365
if {$prop in $printable} {
366366
if {$prop eq "ConstitutiveLaw"} {
367367
write::WriteString " DEM_DISCONTINUUM_CONSTITUTIVE_LAW_NAME $val"
368+
} elseif {$prop eq "FRICTION"} {
369+
set pi 3.1415926535897931
370+
set propvalue [expr {tan($val*$pi/180.0)}]
371+
write::WriteString " FRICTION $propvalue"
368372
} else {
369373
write::WriteString " $prop $val"
370374
}

kratos.gid/apps/DEM/xml/Materials.xml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<parameter n="PARTICLE_DENSITY" pn="Density" unit_magnitude="Density" units="kg/m^3" v="2500.0" type="double" help="Density of the material (not bulk density)"/>
66
<parameter n="YOUNG_MODULUS" pn="Young Modulus" unit_magnitude="P" units="Pa" v="1.0e5" type="double" help="The Youngs Modulus of the material (not bulk stiffness)"/>
77
<parameter n="POISSON_RATIO" pn="Poisson Ratio" v="0.20" type="double" help="The Poissons Ratio of the material (not bulk Ratio)"/>
8-
<parameter n="FRICTION" pn="Coefficient of friction" v="1.0" type="double" help="Particle friction coefficient (for Coulombs friction)"/>
9-
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.2" type="double" help="Particle friction angle (for Coulombs friction)"/>
8+
<parameter n="FRICTION" pn="Friction angle" v="30.0" type="double" units="deg" unit_magnitude="Angle" help="Particle friction angle (for Coulombs friction)"/>
9+
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.2" type="double" help=""/>
1010
<parameter n="PARTICLE_MATERIAL" pn="Color" v="1" type="integer"/>
1111
<parameter n="ROLLING_FRICTION" pn="Rolling friction" v="0.01" type="double" help="Rolling friction"/>
1212
<parameter n="ROLLING_FRICTION_WITH_WALLS" pn="Rolling friction With Walls" v="0.01" type="double" help="Rolling friction with walls"/>
@@ -19,8 +19,8 @@
1919
<parameter n="PARTICLE_DENSITY" pn="Density" unit_magnitude="Density" units="kg/m^3" v="1250.0" type="double" help="Density of the material (not bulk density)"/>
2020
<parameter n="YOUNG_MODULUS" pn="Young Modulus" unit_magnitude="P" units="Pa" v="1.0e7" type="double" help="The Youngs Modulus of the material (not bulk stiffness)"/>
2121
<parameter n="POISSON_RATIO" pn="Poisson Ratio" v="0.20" type="double" help="The Poissons Ratio of the material (not bulk Ratio)"/>
22-
<parameter n="FRICTION" pn="Coefficient of friction" v="1.0" type="double" help="Particle friction coefficient (for Coulombs friction)"/>
23-
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.5" type="double" help="Particle friction angle (for Coulombs friction)"/>
22+
<parameter n="FRICTION" pn="Friction angle" v="30.0" type="double" units="deg" unit_magnitude="Angle" help="Particle friction angle (for Coulombs friction)"/>
23+
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.5" type="double" help=""/>
2424
<parameter n="PARTICLE_MATERIAL" pn="Color" v="2" type="integer"/>
2525
<parameter n="ROLLING_FRICTION" pn="Rolling friction" v="0.01" type="double" help="Rolling friction"/>
2626
<parameter n="ROLLING_FRICTION_WITH_WALLS" pn="Rolling friction With Walls" v="0.01" type="double" help="Rolling friction with walls"/>
@@ -32,8 +32,8 @@
3232
<parameter n="PARTICLE_DENSITY" pn="Density" unit_magnitude="Density" units="kg/m^3" v="1309.0" type="double" help="Density of the material (not bulk density)"/>
3333
<parameter n="YOUNG_MODULUS" pn="Young Modulus" unit_magnitude="P" units="Pa" v="1.0e7" type="double" help="The Youngs Modulus of the material (not bulk stiffness)"/>
3434
<parameter n="POISSON_RATIO" pn="Poisson Ratio" v="0.20" type="double" help="The Poissons Ratio of the material (not bulk Ratio)"/>
35-
<parameter n="FRICTION" pn="Coefficient of friction" v="1.0" type="double" help="Particle friction coefficient (for Coulombs friction)"/>
36-
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.5" type="double" help="Particle friction angle (for Coulombs friction)"/>
35+
<parameter n="FRICTION" pn="Friction angle" v="30.0" type="double" units="deg" unit_magnitude="Angle" help="Particle friction angle (for Coulombs friction)"/>
36+
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.5" type="double" help=""/>
3737
<parameter n="PARTICLE_MATERIAL" pn="Color" v="2" type="integer"/>
3838
<parameter n="ROLLING_FRICTION" pn="Rolling friction" v="0.01" type="double" help="Rolling friction"/>
3939
<parameter n="ROLLING_FRICTION_WITH_WALLS" pn="Rolling friction With Walls" v="0.01" type="double" help="Rolling friction with walls"/>
@@ -45,8 +45,8 @@
4545
<parameter n="PARTICLE_DENSITY" pn="Density" unit_magnitude="Density" units="kg/m^3" v="1300.0" type="double" help="Density of the material (not bulk density)"/>
4646
<parameter n="YOUNG_MODULUS" pn="Young Modulus" unit_magnitude="P" units="Pa" v="1.0e7" type="double" help="The Youngs Modulus of the material (not bulk stiffness)"/>
4747
<parameter n="POISSON_RATIO" pn="Poisson Ratio" v="0.20" type="double" help="The Poissons Ratio of the material (not bulk Ratio)"/>
48-
<parameter n="FRICTION" pn="Coefficient of friction" v="1.0" type="double" help="Particle friction coefficient (for Coulombs friction)"/>
49-
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.25" type="double" help="Particle friction angle (for Coulombs friction)"/>
48+
<parameter n="FRICTION" pn="Friction angle" v="30.0" type="double" units="deg" unit_magnitude="Angle" help="Particle friction angle (for Coulombs friction)"/>
49+
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.25" type="double" help=""/>
5050
<parameter n="PARTICLE_MATERIAL" pn="Color" v="3" type="integer"/>
5151
<parameter n="ROLLING_FRICTION" pn="Rolling friction" v="0.01" type="double" help="Rolling friction"/>
5252
<parameter n="ROLLING_FRICTION_WITH_WALLS" pn="Rolling friction With Walls" v="0.01" type="double" help="Rolling friction with walls"/>
@@ -58,8 +58,8 @@
5858
<parameter n="PARTICLE_DENSITY" pn="Density" unit_magnitude="Density" units="kg/m^3" v="2500.0" type="double" help="Density of the material (not bulk density)"/>
5959
<parameter n="YOUNG_MODULUS" pn="Young Modulus" unit_magnitude="P" units="Pa" v="1.0e9" type="double" help="The Youngs Modulus of the material (not bulk stiffness)"/>
6060
<parameter n="POISSON_RATIO" pn="Poisson Ratio" v="0.20" type="double" help="The Poissons Ratio of the material (not bulk Ratio)"/>
61-
<parameter n="FRICTION" pn="Coefficient of friction" v="1.0" type="double" help="Particle friction coefficient (for Coulombs friction)"/>
62-
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.1" type="double" help="Particle friction angle (for Coulombs friction)"/>
61+
<parameter n="FRICTION" pn="Friction angle" v="30.0" type="double" units="deg" unit_magnitude="Angle" help="Particle friction angle (for Coulombs friction)"/>
62+
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.1" type="double" help=""/>
6363
<parameter n="PARTICLE_MATERIAL" pn="Color" v="4" type="integer"/>
6464
<parameter n="ROLLING_FRICTION" pn="Rolling friction" v="0.01" type="double" help="Rolling friction"/>
6565
<parameter n="ROLLING_FRICTION_WITH_WALLS" pn="Rolling friction With Walls" v="0.01" type="double" help="Rolling friction with walls"/>
@@ -71,8 +71,8 @@
7171
<parameter n="PARTICLE_DENSITY" pn="Density" unit_magnitude="Density" units="kg/m^3" v="2500.0" type="double" help="Density of the material (not bulk density)"/>
7272
<parameter n="YOUNG_MODULUS" pn="Young Modulus" unit_magnitude="P" units="Pa" v="1.0e9" type="double" help="The Youngs Modulus of the material (not bulk stiffness)"/>
7373
<parameter n="POISSON_RATIO" pn="Poisson Ratio" v="0.20" type="double" help="The Poissons Ratio of the material (not bulk Ratio)"/>
74-
<parameter n="FRICTION" pn="Coefficient of friction" v="1.0" type="double" help="Particle friction coefficient (for Coulombs friction)"/>
75-
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.1" type="double" help="Particle friction angle (for Coulombs friction)"/>
74+
<parameter n="FRICTION" pn="Friction angle" v="30.0" type="double" units="deg" unit_magnitude="Angle" help="Particle friction angle (for Coulombs friction)"/>
75+
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.1" type="double" help=""/>
7676
<parameter n="PARTICLE_MATERIAL" pn="Color" v="5" type="integer"/>
7777
<parameter n="ROLLING_FRICTION" pn="Rolling friction" v="0.01" type="double" help="Rolling friction"/>
7878
<parameter n="ROLLING_FRICTION_WITH_WALLS" pn="Rolling friction With Walls" v="0.01" type="double" help="Rolling friction with walls"/>
@@ -84,8 +84,8 @@
8484
<parameter n="PARTICLE_DENSITY" pn="Density" unit_magnitude="Density" units="kg/m^3" v="2700.0" type="double" help="Density of the material (not bulk density)"/>
8585
<parameter n="YOUNG_MODULUS" pn="Young Modulus" unit_magnitude="P" units="Pa" v="5.1e9" type="double" help="The Youngs Modulus of the material (not bulk stiffness)"/>
8686
<parameter n="POISSON_RATIO" pn="Poisson Ratio" v="0.18" type="double" help="The Poissons Ratio of the material (not bulk Ratio)"/>
87-
<parameter n="FRICTION" pn="Coefficient of friction" v="1.0" type="double" help="Particle friction coefficient (for Coulombs friction)"/>
88-
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.4" type="double" help="Particle friction angle (for Coulombs friction)"/>
87+
<parameter n="FRICTION" pn="Friction angle" v="30.0" type="double" units="deg" unit_magnitude="Angle" help="Particle friction angle (for Coulombs friction)"/>
88+
<parameter n="COEFFICIENT_OF_RESTITUTION" pn="Coefficient of restitution" v="0.4" type="double" help=""/>
8989
<parameter n="PARTICLE_MATERIAL" pn="Color" v="6" type="integer"/>
9090
<parameter n="ROLLING_FRICTION" pn="Rolling friction" v="0.01" type="double" help="Rolling friction"/>
9191
<parameter n="ROLLING_FRICTION_WITH_WALLS" pn="Rolling friction With Walls" v="0.01" type="double" help="Rolling friction with walls"/>

kratos.gid/apps/DEM/xml/Processes.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
</parameter>
110110

111111
<parameter n="IsGhost" parent="true" pn="Is ghost wall" v="false" type="bool" show_in_window="0"/>
112-
<parameter n="friction_coeff" parent="true" pn="Friction angle" v="30.0" type="double" units="deg" unit_magnitude="Angle" help="Coulomb friction coefficient" show_in_window="0"/>
112+
<parameter n="friction_angle" parent="true" pn="Friction angle" v="30.0" type="double" units="deg" unit_magnitude="Angle" help="" show_in_window="0"/>
113113
<parameter n="GraphPrint" parent="true" pn="Print group forces" v="false" type="bool" show_in_window="0"/>
114114
<parameter n="CohesiveWall" parent="true" pn="Cohesive Wall" v="false" type="bool" help="Specify if the wall presents a cohesive behaviour" show_in_window="0">
115115
<parameter n="WallCohesion" parent="true" pn="Wall cohesion" v="0.0" type="double" units="N/m^2" unit_magnitude="F/L^2" help="JKR or DMT energy surface" show_in_window="0"/>

0 commit comments

Comments
 (0)