Skip to content

Commit 22aa6c6

Browse files
Name of example
1 parent fb9a18c commit 22aa6c6

6 files changed

Lines changed: 30 additions & 14 deletions

File tree

kratos.gid/apps/GeoMechanics/app.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"controllers/Python.tcl",
2020
"controllers/PhreaticLine.tcl",
2121
"examples/examples.tcl",
22-
"examples/FirstExample.tcl",
23-
"examples/SecondExample.tcl"
22+
"examples/Simple.tcl"
2423
],
2524
"start_script": "::GeoMechanics::Init",
2625
"requirements": {

kratos.gid/apps/GeoMechanics/examples/SecondExample.tcl renamed to kratos.gid/apps/GeoMechanics/examples/Simple.tcl

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
namespace eval ::GeoMechanics::examples::SecondExample {
1+
namespace eval ::GeoMechanics::examples::Simple {
22
namespace path ::GeoMechanics::examples
33
Kratos::AddNamespace [namespace current]
44

55
}
66

7-
proc ::GeoMechanics::examples::SecondExample::Init {args} {
7+
proc ::GeoMechanics::examples::Simple::Init {args} {
88
if {![Kratos::IsModelEmpty]} {
99
set txt "We are going to draw the example geometry.\nDo you want to lose your previous work?"
1010
set retval [tk_messageBox -default ok -icon question -message $txt -type okcancel]
@@ -24,7 +24,7 @@ proc ::GeoMechanics::examples::SecondExample::Init {args} {
2424
GiD_Process 'Zoom Frame
2525
}
2626

27-
proc ::GeoMechanics::examples::SecondExample::DrawGeometry {args} {
27+
proc ::GeoMechanics::examples::Simple::DrawGeometry {args} {
2828

2929
Kratos::ResetModel
3030
set layer_in_use Model
@@ -52,7 +52,7 @@ proc ::GeoMechanics::examples::SecondExample::DrawGeometry {args} {
5252

5353
}
5454

55-
proc ::GeoMechanics::examples::SecondExample::AssignGroups {args} {
55+
proc ::GeoMechanics::examples::Simple::AssignGroups {args} {
5656
# Fluid group creation
5757
GiD_Groups create Bottom
5858
GiD_EntitiesGroups assign Bottom lines 1
@@ -77,11 +77,11 @@ proc ::GeoMechanics::examples::SecondExample::AssignGroups {args} {
7777
}
7878

7979

80-
proc ::GeoMechanics::examples::SecondExample::AssignMeshSizes {args} {
80+
proc ::GeoMechanics::examples::Simple::AssignMeshSizes {args} {
8181

8282
}
8383

84-
proc ::GeoMechanics::examples::SecondExample::TreeAssignation {args} {
84+
proc ::GeoMechanics::examples::Simple::TreeAssignation {args} {
8585
set nd $::Model::SpatialDimension
8686
set root [customlib::GetBaseRoot]
8787

@@ -202,6 +202,12 @@ proc ::GeoMechanics::examples::SecondExample::TreeAssignation {args} {
202202
$excavation_node setAttribute ov surface
203203
set props [list deactivate_soil_part true]
204204
spdAux::SetValuesOnBaseNode $excavation_node $props
205+
206+
# Set excavation line stress
207+
set hydro_load [spdAux::getRoute "GEOMWater" $stage]/condition\[@n='WaterPressure2D'\]
208+
set hydro_load_node [customlib::AddConditionGroupOnXPath $hydro_load "Hydrostatic_load_in_sloot"]
209+
$hydro_load_node setAttribute ov line
210+
205211

206212
spdAux::parseRoutes
207213

kratos.gid/apps/GeoMechanics/examples/examples.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Groups>
33
<Group id="GeoMechanics" name="GeoMechanics examples">
4-
<Example id="GeoMechanicsFirstExample2D" app="GeoMechanics" logo="FirstExample.png" name="GeoMechanics\nFirst example 2D" dim="2D" cmd="::GeoMechanics::examples::FirstExample::Init">
4+
<!-- <Example id="GeoMechanicsFirstExample2D" app="GeoMechanics" logo="FirstExample.png" name="GeoMechanics\nFirst example 2D" dim="2D" cmd="::GeoMechanics::examples::FirstExample::Init">
55
<Description></Description>
66
</Example>
7-
8-
<Example id="GeoMechanicsSecondExample2D" app="GeoMechanics" logo="SecondExample.png" name="GeoMechanics\nSecond example 2D" dim="2D" cmd="::GeoMechanics::examples::SecondExample::Init">
7+
-->
8+
<Example id="GeoMechanicsSimple2D" app="GeoMechanics" logo="Simple.png" name="GeoMechanics\nSecond example 2D" dim="2D" cmd="::GeoMechanics::examples::Simple::Init">
99
<Description></Description>
1010
</Example>
1111
</Group>
1021 Bytes
Loading

kratos.gid/apps/GeoMechanics/xml/Conditions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<ConditionItem n="WaterPressure2D" pn="Water pressure" Interval="False"
2424
ImplementedInApplication="GeoMechanicsApplication" MinimumKratosVersion="9000"
2525
WorkingSpaceDimension="2D" LocalSpaceDimension="0" RequiresLocalAxes="False"
26-
ElementType="Line" ProcessName="ApplyConstantBoundaryPhreaticLinePressureProcess" VariableName="NORMAL_CONTACT_STRESS"
26+
ElementType="Line" ProcessName="ApplyWaterPressureProcess" VariableName="NORMAL_CONTACT_STRESS"
2727
help="Self weight application by means of the AssignVectorByDirectionProcess in the core" units="m/s^2" unit_magnitude="Acceleration" Water="True">
2828
<TopologyFeatures>
2929
<item GeometryType="Line" nodes="2" KratosName="Condition2D2N" KratosNameSmallDisplacement="Condition2D2N"/>

kratos.gid/apps/GeoMechanics/xml/Processes.xml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,24 @@
1111
<parameter n="deactivate_soil_part" pn="Deactivate soil part" type="bool" v="true" values="true,false" />
1212
</inputs>
1313
</Process>
14-
<Process n="ApplyConstantBoundaryPhreaticLinePressureProcess" pn="Apply constant boundary phreatic line pressure process" python_module="apply_constant_boundary_phreatic_line_pressure_process" kratos_module="KratosMultiphysics.GeoMechanicsApplication" help="">
14+
<Process n="ApplyConstantBoundaryPhreaticLinePressureProcess" pn="Apply constant boundary phreatic line pressure process" python_module="apply_scalar_constraint_table_process" kratos_module="KratosMultiphysics.GeoMechanicsApplication" help="">
1515
<inputs>
1616
<parameter n="fluid_pressure_type" pn="Pressure type" type="combo" v="Uniform" values="Uniform,Hydrostatic">
1717
<parameter n="value" pn="Value" type="double" v="0.0" function="0" has_units="1" parent="Uniform"/>
1818
<parameter n="gravity_direction" pn="Gravity direction" type="double" v="0.0" function="0" has_units="0" parent="Hydrostatic"/>
1919
<parameter n="reference_coordinate" pn="Reference coordinate" type="double" v="0.0" function="0" has_units="0" parent="Hydrostatic"/>
20-
<parameter n="specific_weight" pn="Specific weight" type="double" v="9.1" function="0" has_units="0" parent="Hydrostatic"/>
20+
<parameter n="specific_weight" pn="Specific weight" type="double" v="9.81" function="0" has_units="0" parent="Hydrostatic"/>
21+
</parameter>
22+
</inputs>
23+
</Process>
24+
<Process n="ApplyWaterPressureProcess" pn="Apply constant boundary phreatic line pressure process" python_module="apply_normal_load_table_process" kratos_module="KratosMultiphysics.GeoMechanicsApplication" help="">
25+
<inputs>
26+
<parameter n="active" pn="Active" type="vector" vectorType="bool" v="1,1,1"/>
27+
<parameter n="value" pn="Value" type="vector" vectorType="double" v="0.0,0.0,0.0" function="0" has_units="1"/>
28+
<parameter n="fluid_pressure_type" pn="Pressure type" type="combo" v="Uniform" values="Uniform,Hydrostatic">
29+
<parameter n="gravity_direction" pn="Gravity direction" type="double" v="0.0" function="0" has_units="0" parent="Hydrostatic"/>
30+
<parameter n="reference_coordinate" pn="Reference coordinate" type="double" v="0.0" function="0" has_units="0" parent="Hydrostatic"/>
31+
<parameter n="specific_weight" pn="Specific weight" type="double" v="9.81" function="0" has_units="0" parent="Hydrostatic"/>
2132
</parameter>
2233
</inputs>
2334
</Process>

0 commit comments

Comments
 (0)