Skip to content

Contact example#1038

Merged
jginternational merged 14 commits into
masterfrom
contact-example
Jul 7, 2026
Merged

Contact example#1038
jginternational merged 14 commits into
masterfrom
contact-example

Conversation

@jginternational

Copy link
Copy Markdown
Member

Implements #965

@jginternational jginternational self-assigned this Jun 12, 2026
Copilot AI review requested due to automatic review settings June 12, 2026 10:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Structural Mechanics GUI example intended to demonstrate solid contact setup (requested in #965), and registers it so it appears in the Structural examples list and is loaded by the app.

Changes:

  • Introduces a new example script SolidContact.tcl that builds a 2D two-body setup with contact-related groups and tree assignations.
  • Registers the new example in examples.xml so it shows up in the GUI.
  • Includes the new example script in app.json so it is packaged/loaded with the Structural app.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
kratos.gid/apps/Structural/examples/SolidContact.tcl New Tcl example implementing geometry/groups/meshing/tree setup for a 2D solid contact case.
kratos.gid/apps/Structural/examples/examples.xml Adds a new “Solid contact 2D” example entry.
kratos.gid/apps/Structural/app.json Registers the new example script for inclusion/loading.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread kratos.gid/apps/Structural/examples/SolidContact.tcl Outdated
Comment thread kratos.gid/apps/Structural/examples/examples.xml
Comment thread kratos.gid/apps/Structural/examples/SolidContact.tcl Outdated
jginternational and others added 2 commits June 12, 2026 12:56
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.

Comment on lines +47 to +57
## Lines ##
# join points 1 2 3 4 in a line and 5 6 7 8 in another line
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 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]
Comment thread kratos.gid/apps/Structural/examples/SolidContact.tcl
Comment on lines +96 to +99
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
Comment on lines +141 to +142
spdAux::AddIntervalGroup InterfaceStructure1 "InterfaceStructure1"
GiD_Groups edit state "InterfaceStructure1" hidden
Comment on lines +19 to +21
<Example id="SolidContact2D" app="Structural" logo="Contact2D.png" name="Solid contact 2D" dim="2D" cmd="::Structural::examples::SolidContact::Init">
<Description></Description>
</Example>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.

Comment thread kratos.gid/apps/Structural/examples/SolidContact.tcl
Comment thread kratos.gid/apps/Structural/examples/SolidContact.tcl
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

spdAux::AddIntervalGroup InterfaceStructure1 "InterfaceStructure1"
Comment thread kratos.gid/apps/Structural/examples/SolidContact.tcl Outdated
Comment thread kratos.gid/apps/Structural/examples/examples.xml
jginternational and others added 2 commits July 7, 2026 13:05
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jginternational jginternational merged commit 5ec910e into master Jul 7, 2026
@jginternational jginternational deleted the contact-example branch July 7, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants