Skip to content

Commit

Permalink
Name of example
Browse files Browse the repository at this point in the history
  • Loading branch information
jginternational committed Oct 18, 2023
1 parent fb9a18c commit 22aa6c6
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 14 deletions.
3 changes: 1 addition & 2 deletions kratos.gid/apps/GeoMechanics/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"controllers/Python.tcl",
"controllers/PhreaticLine.tcl",
"examples/examples.tcl",
"examples/FirstExample.tcl",
"examples/SecondExample.tcl"
"examples/Simple.tcl"
],
"start_script": "::GeoMechanics::Init",
"requirements": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
namespace eval ::GeoMechanics::examples::SecondExample {
namespace eval ::GeoMechanics::examples::Simple {
namespace path ::GeoMechanics::examples
Kratos::AddNamespace [namespace current]

}

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

proc ::GeoMechanics::examples::SecondExample::DrawGeometry {args} {
proc ::GeoMechanics::examples::Simple::DrawGeometry {args} {

Kratos::ResetModel
set layer_in_use Model
Expand Down Expand Up @@ -52,7 +52,7 @@ proc ::GeoMechanics::examples::SecondExample::DrawGeometry {args} {

}

proc ::GeoMechanics::examples::SecondExample::AssignGroups {args} {
proc ::GeoMechanics::examples::Simple::AssignGroups {args} {
# Fluid group creation
GiD_Groups create Bottom
GiD_EntitiesGroups assign Bottom lines 1
Expand All @@ -77,11 +77,11 @@ proc ::GeoMechanics::examples::SecondExample::AssignGroups {args} {
}


proc ::GeoMechanics::examples::SecondExample::AssignMeshSizes {args} {
proc ::GeoMechanics::examples::Simple::AssignMeshSizes {args} {

}

proc ::GeoMechanics::examples::SecondExample::TreeAssignation {args} {
proc ::GeoMechanics::examples::Simple::TreeAssignation {args} {
set nd $::Model::SpatialDimension
set root [customlib::GetBaseRoot]

Expand Down Expand Up @@ -202,6 +202,12 @@ proc ::GeoMechanics::examples::SecondExample::TreeAssignation {args} {
$excavation_node setAttribute ov surface
set props [list deactivate_soil_part true]
spdAux::SetValuesOnBaseNode $excavation_node $props

# Set excavation line stress
set hydro_load [spdAux::getRoute "GEOMWater" $stage]/condition\[@n='WaterPressure2D'\]
set hydro_load_node [customlib::AddConditionGroupOnXPath $hydro_load "Hydrostatic_load_in_sloot"]
$hydro_load_node setAttribute ov line


spdAux::parseRoutes

Expand Down
6 changes: 3 additions & 3 deletions kratos.gid/apps/GeoMechanics/examples/examples.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Groups>
<Group id="GeoMechanics" name="GeoMechanics examples">
<Example id="GeoMechanicsFirstExample2D" app="GeoMechanics" logo="FirstExample.png" name="GeoMechanics\nFirst example 2D" dim="2D" cmd="::GeoMechanics::examples::FirstExample::Init">
<!-- <Example id="GeoMechanicsFirstExample2D" app="GeoMechanics" logo="FirstExample.png" name="GeoMechanics\nFirst example 2D" dim="2D" cmd="::GeoMechanics::examples::FirstExample::Init">
<Description></Description>
</Example>

<Example id="GeoMechanicsSecondExample2D" app="GeoMechanics" logo="SecondExample.png" name="GeoMechanics\nSecond example 2D" dim="2D" cmd="::GeoMechanics::examples::SecondExample::Init">
-->
<Example id="GeoMechanicsSimple2D" app="GeoMechanics" logo="Simple.png" name="GeoMechanics\nSecond example 2D" dim="2D" cmd="::GeoMechanics::examples::Simple::Init">
<Description></Description>
</Example>
</Group>
Expand Down
Binary file added kratos.gid/apps/GeoMechanics/images/Simple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion kratos.gid/apps/GeoMechanics/xml/Conditions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<ConditionItem n="WaterPressure2D" pn="Water pressure" Interval="False"
ImplementedInApplication="GeoMechanicsApplication" MinimumKratosVersion="9000"
WorkingSpaceDimension="2D" LocalSpaceDimension="0" RequiresLocalAxes="False"
ElementType="Line" ProcessName="ApplyConstantBoundaryPhreaticLinePressureProcess" VariableName="NORMAL_CONTACT_STRESS"
ElementType="Line" ProcessName="ApplyWaterPressureProcess" VariableName="NORMAL_CONTACT_STRESS"
help="Self weight application by means of the AssignVectorByDirectionProcess in the core" units="m/s^2" unit_magnitude="Acceleration" Water="True">
<TopologyFeatures>
<item GeometryType="Line" nodes="2" KratosName="Condition2D2N" KratosNameSmallDisplacement="Condition2D2N"/>
Expand Down
15 changes: 13 additions & 2 deletions kratos.gid/apps/GeoMechanics/xml/Processes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,24 @@
<parameter n="deactivate_soil_part" pn="Deactivate soil part" type="bool" v="true" values="true,false" />
</inputs>
</Process>
<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="">
<Process n="ApplyConstantBoundaryPhreaticLinePressureProcess" pn="Apply constant boundary phreatic line pressure process" python_module="apply_scalar_constraint_table_process" kratos_module="KratosMultiphysics.GeoMechanicsApplication" help="">
<inputs>
<parameter n="fluid_pressure_type" pn="Pressure type" type="combo" v="Uniform" values="Uniform,Hydrostatic">
<parameter n="value" pn="Value" type="double" v="0.0" function="0" has_units="1" parent="Uniform"/>
<parameter n="gravity_direction" pn="Gravity direction" type="double" v="0.0" function="0" has_units="0" parent="Hydrostatic"/>
<parameter n="reference_coordinate" pn="Reference coordinate" type="double" v="0.0" function="0" has_units="0" parent="Hydrostatic"/>
<parameter n="specific_weight" pn="Specific weight" type="double" v="9.1" function="0" has_units="0" parent="Hydrostatic"/>
<parameter n="specific_weight" pn="Specific weight" type="double" v="9.81" function="0" has_units="0" parent="Hydrostatic"/>
</parameter>
</inputs>
</Process>
<Process n="ApplyWaterPressureProcess" pn="Apply constant boundary phreatic line pressure process" python_module="apply_normal_load_table_process" kratos_module="KratosMultiphysics.GeoMechanicsApplication" help="">
<inputs>
<parameter n="active" pn="Active" type="vector" vectorType="bool" v="1,1,1"/>
<parameter n="value" pn="Value" type="vector" vectorType="double" v="0.0,0.0,0.0" function="0" has_units="1"/>
<parameter n="fluid_pressure_type" pn="Pressure type" type="combo" v="Uniform" values="Uniform,Hydrostatic">
<parameter n="gravity_direction" pn="Gravity direction" type="double" v="0.0" function="0" has_units="0" parent="Hydrostatic"/>
<parameter n="reference_coordinate" pn="Reference coordinate" type="double" v="0.0" function="0" has_units="0" parent="Hydrostatic"/>
<parameter n="specific_weight" pn="Specific weight" type="double" v="9.81" function="0" has_units="0" parent="Hydrostatic"/>
</parameter>
</inputs>
</Process>
Expand Down

0 comments on commit 22aa6c6

Please sign in to comment.