From 7df6b03c3f1229b3b164adc742422bb5e2c301be Mon Sep 17 00:00:00 2001 From: Javi Garate Date: Thu, 11 Jun 2026 14:42:13 +0200 Subject: [PATCH 1/9] geometry --- kratos.gid/apps/Structural/app.json | 1 + .../apps/Structural/examples/SolidContact.tcl | 134 ++++++++++++++++++ .../apps/Structural/examples/examples.xml | 3 + 3 files changed, 138 insertions(+) create mode 100644 kratos.gid/apps/Structural/examples/SolidContact.tcl diff --git a/kratos.gid/apps/Structural/app.json b/kratos.gid/apps/Structural/app.json index 6d50b4c46..84da8eddf 100644 --- a/kratos.gid/apps/Structural/app.json +++ b/kratos.gid/apps/Structural/app.json @@ -19,6 +19,7 @@ "examples/TrussCantilever.tcl", "examples/HighRiseBuilding.tcl", "examples/IncompressibleCookMembrane.tcl", + "examples/SolidContact.tcl", "xml/XmlController.tcl", "write/write.tcl", "write/writeProjectParameters.tcl", diff --git a/kratos.gid/apps/Structural/examples/SolidContact.tcl b/kratos.gid/apps/Structural/examples/SolidContact.tcl new file mode 100644 index 000000000..e28fa92d4 --- /dev/null +++ b/kratos.gid/apps/Structural/examples/SolidContact.tcl @@ -0,0 +1,134 @@ +namespace eval ::Structural::examples::SolidContact { + namespace path ::Structural::examples + Kratos::AddNamespace [namespace current] + +} + +proc ::Structural::examples::SolidContact::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] + if { $retval == "cancel" } { return } + } + + Kratos::ResetModel + DrawGeometry$::Model::SpatialDimension + if {0} { + AssignGroups$::Model::SpatialDimension + AssignMeshSizes$::Model::SpatialDimension + TreeAssignation$::Model::SpatialDimension + } + GiD_Process 'Redraw + GidUtils::UpdateWindow GROUPS + GidUtils::UpdateWindow LAYER + GiD_Process 'Zoom Frame +} + +proc ::Structural::examples::SolidContact::DrawGeometry2D {args} { + GiD_Layers create Structure1 + GiD_Layers edit to_use Structure1 + GiD_Layers create Structure2 + GiD_Layers edit to_use Structure2 + + # Geometry creation + ## Points ## + set coordinates1 [list 0 0 0 1 0 0 1 0.25 0 0 0.25 0] + set structurePoints1 [list ] + foreach {x y z} $coordinates1 { + lappend structurePoints1 [GiD_Geometry create point append Structure1 $x $y $z] + } + + set coordinates2 [list 0 0.255 0 1 0.255 0 1 0.505 0 0 0.505 0] + set structurePoints2 [list ] + foreach {x y z} $coordinates2 { + lappend structurePoints2 [GiD_Geometry create point append Structure2 $x $y $z] + } + + + + ## Lines ## + # join points 1 2 3 4 in a line and 5 6 7 8 in another line + set line1Points [lrange $structurePoints1 0 3] + set prevpoint [lindex $line1Points 0] + foreach point $line1Points { + lappend structureLines1 [GiD_Geometry create line append stline Structure1 $prevpoint $point] + set prevpoint $point + } + lappend structureLines1 [GiD_Geometry create line append stline Structure1 $prevpoint [lindex $line1Points 0]] + + set line2Points [lrange $structurePoints2 0 3] + set prevpoint [lindex $line2Points 0] + foreach point $line2Points { + lappend structureLines2 [GiD_Geometry create line append stline Structure2 $prevpoint $point] + set prevpoint $point + } + lappend structureLines2 [GiD_Geometry create line append stline Structure2 $prevpoint [lindex $line2Points 0]] + + ## Surface ## + GiD_Layers edit to_use Structure1 + GiD_Process Mescape Geometry Create NurbsSurface {*}$structureLines1 escape escape + GiD_Layers edit to_use Structure2 + GiD_Process Mescape Geometry Create NurbsSurface {*}$structureLines2 escape escape +} + +proc ::Structural::examples::SolidContact::AssignGroups2D {args} { + # Group creation + GiD_Groups create Structure + GiD_Groups create Ground + GiD_Groups create InterfaceStructure + + GiD_EntitiesGroups assign Structure surfaces 1 + GiD_EntitiesGroups assign Ground lines 4 + GiD_EntitiesGroups assign InterfaceStructure lines {1 2 3} +} + +proc ::Structural::examples::SolidContact::AssignMeshSizes2D {args} { + set structure_mesh_size 5.0 + GiD_Process Mescape Meshing ElemType Quadrilateral [GiD_EntitiesGroups get Structure surfaces] escape + GiD_Process Mescape Meshing Structured Surfaces Size {*}[GiD_EntitiesGroups get Structure surfaces] escape $structure_mesh_size {*}[GiD_EntitiesGroups get InterfaceStructure lines] escape escape escape escape +} + + +proc ::Structural::examples::SolidContact::TreeAssignation2D {args} { + set nd $::Model::SpatialDimension + set root [customlib::GetBaseRoot] + + # Structural + gid_groups_conds::setAttributesF {container[@n='Structural']/container[@n='StageInfo']/value[@n='SolutionType']} {v Dynamic} + + # Structural Parts + set structParts [spdAux::getRoute "STParts"]/condition\[@n='Parts_Solid'\] + set structPartsNode [customlib::AddConditionGroupOnXPath $structParts Structure] + $structPartsNode setAttribute ov surface + set constLawNameStruc "LinearElasticPlaneStress2DLaw" + set props [list Element TotalLagrangianElement$nd ConstitutiveLaw $constLawNameStruc DENSITY 7850 YOUNG_MODULUS 206.9e9 POISSON_RATIO 0.29 THICKNESS 0.1] + spdAux::SetValuesOnBaseNode $structPartsNode $props + + # Structural Displacement + GiD_Groups clone Ground Total + GiD_Groups edit parent Total Ground + spdAux::AddIntervalGroup Ground "Ground//Total" + GiD_Groups edit state "Ground//Total" hidden + set structDisplacement {container[@n='Structural']/container[@n='Boundary Conditions']/condition[@n='DISPLACEMENT']} + set structDisplacementNode [customlib::AddConditionGroupOnXPath $structDisplacement "Ground//Total"] + $structDisplacementNode setAttribute ov line + set props [list selector_component_X ByValue value_component_X 0.0 selector_component_Y ByValue selector_component_Z Not Interval Total] + spdAux::SetValuesOnBaseNode $structDisplacementNode $props + + # Point load + GiD_Groups clone InterfaceStructure Total + GiD_Groups edit parent Total InterfaceStructure + spdAux::AddIntervalGroup InterfaceStructure "InterfaceStructure//Total" + GiD_Groups edit state "InterfaceStructure//Total" hidden + set structLoad "container\[@n='Structural'\]/container\[@n='Loads'\]/condition\[@n='LineLoad$nd'\]" + set LoadNode [customlib::AddConditionGroupOnXPath $structLoad "InterfaceStructure//Total"] + $LoadNode setAttribute ov line + set props [list ByFunction No modulus 50 value_direction_X 1 Interval Total] + spdAux::SetValuesOnBaseNode $LoadNode $props + + # Structure domain time parameters + [$root selectNodes "[spdAux::getRoute STTimeParameters]/value\[@n = 'EndTime'\]"] setAttribute v 25.0 + [$root selectNodes "[spdAux::getRoute STTimeParameters]/container\[@n = 'TimeStep'\]/blockdata\[1\]/value\[@n = 'DeltaTime'\]"] setAttribute v 0.05 + + spdAux::RequestRefresh +} diff --git a/kratos.gid/apps/Structural/examples/examples.xml b/kratos.gid/apps/Structural/examples/examples.xml index dc226be6f..033de4772 100644 --- a/kratos.gid/apps/Structural/examples/examples.xml +++ b/kratos.gid/apps/Structural/examples/examples.xml @@ -16,4 +16,7 @@ + + + \ No newline at end of file From 1ba4956f447e1db4f58c47f3772f64aa0249ce95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20G=C3=A1rate?= Date: Thu, 11 Jun 2026 16:34:39 +0200 Subject: [PATCH 2/9] group creation --- .../apps/Structural/examples/SolidContact.tcl | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/kratos.gid/apps/Structural/examples/SolidContact.tcl b/kratos.gid/apps/Structural/examples/SolidContact.tcl index e28fa92d4..8c7b13948 100644 --- a/kratos.gid/apps/Structural/examples/SolidContact.tcl +++ b/kratos.gid/apps/Structural/examples/SolidContact.tcl @@ -13,8 +13,8 @@ proc ::Structural::examples::SolidContact::Init {args} { Kratos::ResetModel DrawGeometry$::Model::SpatialDimension + AssignGroups$::Model::SpatialDimension if {0} { - AssignGroups$::Model::SpatialDimension AssignMeshSizes$::Model::SpatialDimension TreeAssignation$::Model::SpatialDimension } @@ -44,8 +44,6 @@ proc ::Structural::examples::SolidContact::DrawGeometry2D {args} { lappend structurePoints2 [GiD_Geometry create point append Structure2 $x $y $z] } - - ## Lines ## # join points 1 2 3 4 in a line and 5 6 7 8 in another line set line1Points [lrange $structurePoints1 0 3] @@ -69,17 +67,30 @@ proc ::Structural::examples::SolidContact::DrawGeometry2D {args} { GiD_Process Mescape Geometry Create NurbsSurface {*}$structureLines1 escape escape GiD_Layers edit to_use Structure2 GiD_Process Mescape Geometry Create NurbsSurface {*}$structureLines2 escape escape + } proc ::Structural::examples::SolidContact::AssignGroups2D {args} { # Group creation - GiD_Groups create Structure + GiD_Groups create Structure1 + GiD_Groups create Structure2 + ## Layers to groups + + GiD_EntitiesGroups assign Structure1 surfaces 1 + GiD_EntitiesGroups assign Structure2 surfaces 2 + + # Displacement boundary conditions GiD_Groups create Ground - GiD_Groups create InterfaceStructure + GiD_EntitiesGroups assign Ground lines 2 + GiD_Groups create Top + GiD_EntitiesGroups assign Top lines 9 + + # Contact interface + GiD_Groups create InterfaceStructure1 + GiD_EntitiesGroups assign InterfaceStructure1 lines 4 + GiD_Groups create InterfaceStructure2 + GiD_EntitiesGroups assign InterfaceStructure2 lines 7 - GiD_EntitiesGroups assign Structure surfaces 1 - GiD_EntitiesGroups assign Ground lines 4 - GiD_EntitiesGroups assign InterfaceStructure lines {1 2 3} } proc ::Structural::examples::SolidContact::AssignMeshSizes2D {args} { From b12d9944ba1ffce3acd710d8746d7633f1912a0c Mon Sep 17 00:00:00 2001 From: Javi Garate Date: Fri, 12 Jun 2026 10:10:10 +0200 Subject: [PATCH 3/9] set parts --- .../apps/Structural/examples/SolidContact.tcl | 50 +++++++++++++++++-- 1 file changed, 46 insertions(+), 4 deletions(-) diff --git a/kratos.gid/apps/Structural/examples/SolidContact.tcl b/kratos.gid/apps/Structural/examples/SolidContact.tcl index e28fa92d4..08760b64a 100644 --- a/kratos.gid/apps/Structural/examples/SolidContact.tcl +++ b/kratos.gid/apps/Structural/examples/SolidContact.tcl @@ -88,20 +88,62 @@ proc ::Structural::examples::SolidContact::AssignMeshSizes2D {args} { GiD_Process Mescape Meshing Structured Surfaces Size {*}[GiD_EntitiesGroups get Structure surfaces] escape $structure_mesh_size {*}[GiD_EntitiesGroups get InterfaceStructure lines] escape escape escape escape } +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# + proc ::Structural::examples::SolidContact::TreeAssignation2D {args} { set nd $::Model::SpatialDimension set root [customlib::GetBaseRoot] # Structural - gid_groups_conds::setAttributesF {container[@n='Structural']/container[@n='StageInfo']/value[@n='SolutionType']} {v Dynamic} + gid_groups_conds::setAttributesF {container[@n='Structural']/container[@n='StageInfo']/value[@n='SolutionType']} {v Quasi-static} # Structural Parts set structParts [spdAux::getRoute "STParts"]/condition\[@n='Parts_Solid'\] - set structPartsNode [customlib::AddConditionGroupOnXPath $structParts Structure] + set structPartsNode [customlib::AddConditionGroupOnXPath $structParts Structure1] + $structPartsNode setAttribute ov surface + set constLawNameStruc "LinearElasticPlaneStrain${nd}Law" + set props [list Element SmallDisplacementElement$nd ConstitutiveLaw $constLawNameStruc DENSITY 7850 YOUNG_MODULUS 206.9e9 POISSON_RATIO 0.29] + spdAux::SetValuesOnBaseNode $structPartsNode $props + set structPartsNode [customlib::AddConditionGroupOnXPath $structParts Structure2] $structPartsNode setAttribute ov surface - set constLawNameStruc "LinearElasticPlaneStress2DLaw" - set props [list Element TotalLagrangianElement$nd ConstitutiveLaw $constLawNameStruc DENSITY 7850 YOUNG_MODULUS 206.9e9 POISSON_RATIO 0.29 THICKNESS 0.1] spdAux::SetValuesOnBaseNode $structPartsNode $props # Structural Displacement From ee31b7217209c40ab52dcbd67eb102ab3e66fd95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20G=C3=A1rate?= Date: Fri, 12 Jun 2026 10:12:22 +0200 Subject: [PATCH 4/9] meshing --- kratos.gid/apps/Structural/examples/SolidContact.tcl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kratos.gid/apps/Structural/examples/SolidContact.tcl b/kratos.gid/apps/Structural/examples/SolidContact.tcl index 8c7b13948..ea8b71dcc 100644 --- a/kratos.gid/apps/Structural/examples/SolidContact.tcl +++ b/kratos.gid/apps/Structural/examples/SolidContact.tcl @@ -94,9 +94,11 @@ proc ::Structural::examples::SolidContact::AssignGroups2D {args} { } proc ::Structural::examples::SolidContact::AssignMeshSizes2D {args} { - set structure_mesh_size 5.0 - GiD_Process Mescape Meshing ElemType Quadrilateral [GiD_EntitiesGroups get Structure surfaces] escape - GiD_Process Mescape Meshing Structured Surfaces Size {*}[GiD_EntitiesGroups get Structure surfaces] escape $structure_mesh_size {*}[GiD_EntitiesGroups get InterfaceStructure lines] escape escape escape escape + set structure_mesh_size 0.1 + GiD_Process Mescape Meshing ElemType Quadrilateral [GiD_EntitiesGroups get Structure1 surfaces] escape + GiD_Process Mescape Meshing ElemType Quadrilateral [GiD_EntitiesGroups get Structure2 surfaces] escape + GiD_Process Mescape Meshing Structured Surfaces Size {*}[GiD_EntitiesGroups get Structure1 surfaces] escape $structure_mesh_size {*}[GiD_EntitiesGroups get InterfaceStructure1 lines] escape escape escape escape + GiD_Process Mescape Meshing Structured Surfaces Size {*}[GiD_EntitiesGroups get Structure2 surfaces] escape $structure_mesh_size {*}[GiD_EntitiesGroups get InterfaceStructure2 lines] escape escape escape escape } From fad4fdb5f35c24ee8666e28f4464ba3a8d1dd90c Mon Sep 17 00:00:00 2001 From: Javi Garate Date: Fri, 12 Jun 2026 10:22:19 +0200 Subject: [PATCH 5/9] delete basurilla --- .../apps/Structural/examples/SolidContact.tcl | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/kratos.gid/apps/Structural/examples/SolidContact.tcl b/kratos.gid/apps/Structural/examples/SolidContact.tcl index 08760b64a..6cef39b86 100644 --- a/kratos.gid/apps/Structural/examples/SolidContact.tcl +++ b/kratos.gid/apps/Structural/examples/SolidContact.tcl @@ -88,46 +88,6 @@ proc ::Structural::examples::SolidContact::AssignMeshSizes2D {args} { GiD_Process Mescape Meshing Structured Surfaces Size {*}[GiD_EntitiesGroups get Structure surfaces] escape $structure_mesh_size {*}[GiD_EntitiesGroups get InterfaceStructure lines] escape escape escape escape } -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# - - proc ::Structural::examples::SolidContact::TreeAssignation2D {args} { set nd $::Model::SpatialDimension set root [customlib::GetBaseRoot] From 89fa96fa5b775364ed080ebf898eca2ea885a1c8 Mon Sep 17 00:00:00 2001 From: Javi Garate Date: Fri, 12 Jun 2026 10:32:48 +0200 Subject: [PATCH 6/9] me he cansado de hacerlo con variables --- .../apps/Structural/examples/SolidContact.tcl | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/kratos.gid/apps/Structural/examples/SolidContact.tcl b/kratos.gid/apps/Structural/examples/SolidContact.tcl index f3d08110b..6fb294448 100644 --- a/kratos.gid/apps/Structural/examples/SolidContact.tcl +++ b/kratos.gid/apps/Structural/examples/SolidContact.tcl @@ -8,16 +8,16 @@ proc ::Structural::examples::SolidContact::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] - if { $retval == "cancel" } { return } + if { $retval == "cancel" } { return } } Kratos::ResetModel DrawGeometry$::Model::SpatialDimension AssignGroups$::Model::SpatialDimension - if {0} { - AssignMeshSizes$::Model::SpatialDimension - TreeAssignation$::Model::SpatialDimension - } + + AssignMeshSizes$::Model::SpatialDimension + TreeAssignation$::Model::SpatialDimension + GiD_Process 'Redraw GidUtils::UpdateWindow GROUPS GidUtils::UpdateWindow LAYER @@ -46,21 +46,16 @@ proc ::Structural::examples::SolidContact::DrawGeometry2D {args} { ## Lines ## # join points 1 2 3 4 in a line and 5 6 7 8 in another line - set line1Points [lrange $structurePoints1 0 3] - set prevpoint [lindex $line1Points 0] - foreach point $line1Points { - lappend structureLines1 [GiD_Geometry create line append stline Structure1 $prevpoint $point] - set prevpoint $point - } - lappend structureLines1 [GiD_Geometry create line append stline Structure1 $prevpoint [lindex $line1Points 0]] + lappend structureLines1 [GiD_Geometry create line append stline Structure1 1 2] + lappend structureLines1 [GiD_Geometry create line append stline Structure1 2 3] + lappend structureLines1 [GiD_Geometry create line append stline Structure1 3 4] + lappend structureLines1 [GiD_Geometry create line append stline Structure1 4 1] + + lappend structureLines2 [GiD_Geometry create line append stline Structure1 5 6] + lappend structureLines2 [GiD_Geometry create line append stline Structure1 6 7] + lappend structureLines2 [GiD_Geometry create line append stline Structure1 7 8] + lappend structureLines2 [GiD_Geometry create line append stline Structure1 8 5] - set line2Points [lrange $structurePoints2 0 3] - set prevpoint [lindex $line2Points 0] - foreach point $line2Points { - lappend structureLines2 [GiD_Geometry create line append stline Structure2 $prevpoint $point] - set prevpoint $point - } - lappend structureLines2 [GiD_Geometry create line append stline Structure2 $prevpoint [lindex $line2Points 0]] ## Surface ## GiD_Layers edit to_use Structure1 From 376f2741391c5b457c23102db1ebcb5e808427cc Mon Sep 17 00:00:00 2001 From: Javi Garate Date: Fri, 12 Jun 2026 12:27:47 +0200 Subject: [PATCH 7/9] details and logo --- .../apps/Structural/examples/SolidContact.tcl | 66 +++++++++++++----- .../apps/Structural/examples/examples.xml | 2 +- .../apps/Structural/images/Contact2D.png | Bin 0 -> 6644 bytes 3 files changed, 48 insertions(+), 20 deletions(-) create mode 100644 kratos.gid/apps/Structural/images/Contact2D.png diff --git a/kratos.gid/apps/Structural/examples/SolidContact.tcl b/kratos.gid/apps/Structural/examples/SolidContact.tcl index 6fb294448..b7c0194b8 100644 --- a/kratos.gid/apps/Structural/examples/SolidContact.tcl +++ b/kratos.gid/apps/Structural/examples/SolidContact.tcl @@ -78,22 +78,26 @@ proc ::Structural::examples::SolidContact::AssignGroups2D {args} { GiD_Groups create Ground GiD_EntitiesGroups assign Ground lines 2 GiD_Groups create Top - GiD_EntitiesGroups assign Top lines 9 + GiD_EntitiesGroups assign Top lines 7 # Contact interface GiD_Groups create InterfaceStructure1 - GiD_EntitiesGroups assign InterfaceStructure1 lines 4 + GiD_EntitiesGroups assign InterfaceStructure1 lines 3 GiD_Groups create InterfaceStructure2 - GiD_EntitiesGroups assign InterfaceStructure2 lines 7 + GiD_EntitiesGroups assign InterfaceStructure2 lines 5 } proc ::Structural::examples::SolidContact::AssignMeshSizes2D {args} { set structure_mesh_size 0.1 - GiD_Process Mescape Meshing ElemType Quadrilateral [GiD_EntitiesGroups get Structure1 surfaces] escape - GiD_Process Mescape Meshing ElemType Quadrilateral [GiD_EntitiesGroups get Structure2 surfaces] escape - GiD_Process Mescape Meshing Structured Surfaces Size {*}[GiD_EntitiesGroups get Structure1 surfaces] escape $structure_mesh_size {*}[GiD_EntitiesGroups get InterfaceStructure1 lines] escape escape escape escape - GiD_Process Mescape Meshing Structured Surfaces Size {*}[GiD_EntitiesGroups get Structure2 surfaces] escape $structure_mesh_size {*}[GiD_EntitiesGroups get InterfaceStructure2 lines] escape escape escape escape + GiD_Process Mescape Meshing ElemType Quadrilateral 1 escape + GiD_Process Mescape Meshing ElemType Quadrilateral 2 escape + + + GiD_MeshData structured surfaces 2 num_divisions 25 7 + GiD_MeshData structured surfaces 2 num_divisions 8 8 + GiD_MeshData structured surfaces 1 num_divisions 23 1 + GiD_MeshData structured surfaces 1 num_divisions 8 4 } proc ::Structural::examples::SolidContact::TreeAssignation2D {args} { @@ -124,21 +128,45 @@ proc ::Structural::examples::SolidContact::TreeAssignation2D {args} { $structDisplacementNode setAttribute ov line set props [list selector_component_X ByValue value_component_X 0.0 selector_component_Y ByValue selector_component_Z Not Interval Total] spdAux::SetValuesOnBaseNode $structDisplacementNode $props + + GiD_Groups clone Top Total + GiD_Groups edit parent Total Top + spdAux::AddIntervalGroup Top "Top//Total" + GiD_Groups edit state "Top//Total" hidden + set structDisplacement {container[@n='Structural']/container[@n='Boundary Conditions']/condition[@n='DISPLACEMENT']} + set structDisplacementNode [customlib::AddConditionGroupOnXPath $structDisplacement "Top//Total"] + $structDisplacementNode setAttribute ov line + set props [list selector_component_X ByValue value_component_X 0.0 selector_component_Y ByFunction function_component_Y "-5e-3*t" selector_component_Z Not Interval Total] + spdAux::SetValuesOnBaseNode $structDisplacementNode $props - # Point load - GiD_Groups clone InterfaceStructure Total - GiD_Groups edit parent Total InterfaceStructure - spdAux::AddIntervalGroup InterfaceStructure "InterfaceStructure//Total" - GiD_Groups edit state "InterfaceStructure//Total" hidden - set structLoad "container\[@n='Structural'\]/container\[@n='Loads'\]/condition\[@n='LineLoad$nd'\]" - set LoadNode [customlib::AddConditionGroupOnXPath $structLoad "InterfaceStructure//Total"] - $LoadNode setAttribute ov line - set props [list ByFunction No modulus 50 value_direction_X 1 Interval Total] - spdAux::SetValuesOnBaseNode $LoadNode $props + spdAux::AddIntervalGroup InterfaceStructure1 "InterfaceStructure1" + GiD_Groups edit state "InterfaceStructure1" hidden + set master_contact "container\[@n='Structural'\]/container\[@n='Boundary Conditions'\]/condition\[@n='CONTACT_SLAVE'\]" + set master_node [customlib::AddConditionGroupOnXPath $master_contact "InterfaceStructure1"] + $master_node setAttribute ov line + set props [list pair 0] + spdAux::SetValuesOnBaseNode $master_node $props + + GiD_Groups clone InterfaceStructure2 Total + GiD_Groups edit parent Total InterfaceStructure2 + spdAux::AddIntervalGroup InterfaceStructure2 "InterfaceStructure2//Total" + GiD_Groups edit state "InterfaceStructure2//Total" hidden + set master_contact "container\[@n='Structural'\]/container\[@n='Boundary Conditions'\]/condition\[@n='CONTACT'\]" + set master_node [customlib::AddConditionGroupOnXPath $master_contact "InterfaceStructure2//Total"] + $master_node setAttribute ov line + set props [list pair 0 Interval Total] + spdAux::SetValuesOnBaseNode $master_node $props # Structure domain time parameters - [$root selectNodes "[spdAux::getRoute STTimeParameters]/value\[@n = 'EndTime'\]"] setAttribute v 25.0 - [$root selectNodes "[spdAux::getRoute STTimeParameters]/container\[@n = 'TimeStep'\]/blockdata\[1\]/value\[@n = 'DeltaTime'\]"] setAttribute v 0.05 + [$root selectNodes "[spdAux::getRoute STTimeParameters]/value\[@n = 'EndTime'\]"] setAttribute v 10 + [$root selectNodes "[spdAux::getRoute STTimeParameters]/container\[@n = 'TimeStep'\]/blockdata\[1\]/value\[@n = 'DeltaTime'\]"] setAttribute v 0.1 + + # turn off results on nodes for Contact + [$root selectNodes "[spdAux::getRoute NodalResults]/value\[@n = 'CONTACT'\]"] setAttribute v No + [$root selectNodes "[spdAux::getRoute NodalResults]/value\[@n = 'CONTACT_SLAVE'\]"] setAttribute v No + + # disable VTK + [$root selectNodes "[spdAux::getRoute VtkOutput]/value\[@n = 'EnableVtkOutput'\]"] setAttribute v No spdAux::RequestRefresh } diff --git a/kratos.gid/apps/Structural/examples/examples.xml b/kratos.gid/apps/Structural/examples/examples.xml index 033de4772..ad16ea01f 100644 --- a/kratos.gid/apps/Structural/examples/examples.xml +++ b/kratos.gid/apps/Structural/examples/examples.xml @@ -16,7 +16,7 @@ - + \ No newline at end of file diff --git a/kratos.gid/apps/Structural/images/Contact2D.png b/kratos.gid/apps/Structural/images/Contact2D.png new file mode 100644 index 0000000000000000000000000000000000000000..0593a518ee4807c2ac0ea773cbec11d737a5da15 GIT binary patch literal 6644 zcmbt(S636>({+Fl0tTtlTWAp!q!*JIX#i`Tbm12U7OnpY?+%c zcxb)7lQeG=;y1MOXJ{wq#c{ySi=myldxtVY#yTz~6XLf-V$Co_eNlw2@C~RCAr7CS zqoLhb!e8QK!eAm*0T#*pA7TBogvCS;0iT`its>ZXsl|hx5v)yWt1`pb=Vw(-zxQqR ztX%2`tc35OwMPy$F0bTQV7c#JeY*VkLiNV^QwP4H>gP)w5nJf`Nq#Rpyw)dz!xfReP% z)q{=0!e|p;w6BAUDt$_m^5m^XZljZy%gCL_?x!x1`I&Pd4?ByCtfy;QgIqWTrzfO7 zSKBi5&=iN(ZEJ4MJF2&e?hD@NC1R95?C&hc2JyyualM!MoiyfPdP&Q_vV^VqlGu2k z+aEj|t=!od!=CQbqoHQ%%)}3Y#4keIHRXKduouSs)d6$mhO?Ei>CuvKLvj!@q~<^c zbigIobn$9V-FmxK^y1l%%42rd;Hq5?_+QR+nx|Dbmzq|XVcg5*qCh2^tK7W6gSz{l z2NmDiM(FGG%3rPDUmgtmV>Z|#wX`~qYdk3D|Epk#vlfuo3b{C9sQl)VTMIW@Al2^1 zsny!KQOr{O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r7^!vw80;O&l1YJlfQ;F9BoOwg^0v`qEnP#nl&MQqK&{ERdhv@!yyd1 z#uur1G0wEOq~c_1eSmSYR+QeqC0`<#huhG6oIxg_o^NiPVG>Fb3I`H^)WTF!`jBuo z3SV#S4~m;nkIWKYL>~y$B+#KUo-gYM&2~2}ef3FPUfi{dVMkx?HZx8XvaP z>bm|Pb=0tZYbZ|O)0N#8PHSTE>0I0wSiM*X^4s&0?YYy3-{wT#4C5R;YQD$Qewk-d z0}46W1%f~t4E7noc3FgrhlqhmoBGTtixvps;_!+ykwps!FJTKJd4mNn_5~u~L66Tl zF*V?ZTiL3-VFfcgZq`wB6}~lUB{y9)nPq3a&RuW+Nsa$ULeNm#Z@Yz_ZTk#T*v6kK zTJK7Gb+4GxM4nUxd$kx}{rym|?Ver~Njr!H@N+S?Xsx)!HqquY*)Puy3j^(*%}bM^ z<|f*NF)F%Y21t>ChDzuowpIqyudjGC8TS94Y12HFy_MwOlXR zKD-tj^e3=IFE6-FY9_W}FF1McW#QxcdxZ~D$4S&o+BY)SGpE=HS#|G65+=3jEtOiDEJKw zovyTh8IjL6{6F3`$l*oHQO(Nn^2^VMmtWQ&Rw~sSb5hQ4Ck`wuJ7BJ$v|Bn}hnure zi$>$0)!i*gG4_ud_Vmj+4vVXdS}B-0dHZ_Gl*LM{`P=SuA}t#|w Date: Fri, 12 Jun 2026 12:56:54 +0200 Subject: [PATCH 8/9] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- kratos.gid/apps/Structural/examples/SolidContact.tcl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kratos.gid/apps/Structural/examples/SolidContact.tcl b/kratos.gid/apps/Structural/examples/SolidContact.tcl index b7c0194b8..a4effd2e4 100644 --- a/kratos.gid/apps/Structural/examples/SolidContact.tcl +++ b/kratos.gid/apps/Structural/examples/SolidContact.tcl @@ -51,10 +51,10 @@ proc ::Structural::examples::SolidContact::DrawGeometry2D {args} { lappend structureLines1 [GiD_Geometry create line append stline Structure1 3 4] lappend structureLines1 [GiD_Geometry create line append stline Structure1 4 1] - lappend structureLines2 [GiD_Geometry create line append stline Structure1 5 6] - lappend structureLines2 [GiD_Geometry create line append stline Structure1 6 7] - lappend structureLines2 [GiD_Geometry create line append stline Structure1 7 8] - lappend structureLines2 [GiD_Geometry create line append stline Structure1 8 5] + lappend structureLines2 [GiD_Geometry create line append stline Structure2 5 6] + lappend structureLines2 [GiD_Geometry create line append stline Structure2 6 7] + lappend structureLines2 [GiD_Geometry create line append stline Structure2 7 8] + lappend structureLines2 [GiD_Geometry create line append stline Structure2 8 5] ## Surface ## From 1fd5a30b91b1bb6e84d080f01bbb86bfb1fe24b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20G=C3=A1rate?= Date: Fri, 12 Jun 2026 12:57:19 +0200 Subject: [PATCH 9/9] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- kratos.gid/apps/Structural/examples/SolidContact.tcl | 1 - 1 file changed, 1 deletion(-) diff --git a/kratos.gid/apps/Structural/examples/SolidContact.tcl b/kratos.gid/apps/Structural/examples/SolidContact.tcl index a4effd2e4..88f47b618 100644 --- a/kratos.gid/apps/Structural/examples/SolidContact.tcl +++ b/kratos.gid/apps/Structural/examples/SolidContact.tcl @@ -89,7 +89,6 @@ proc ::Structural::examples::SolidContact::AssignGroups2D {args} { } proc ::Structural::examples::SolidContact::AssignMeshSizes2D {args} { - set structure_mesh_size 0.1 GiD_Process Mescape Meshing ElemType Quadrilateral 1 escape GiD_Process Mescape Meshing ElemType Quadrilateral 2 escape