Contact example#1038
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.tclthat builds a 2D two-body setup with contact-related groups and tree assignations. - Registers the new example in
examples.xmlso it shows up in the GUI. - Includes the new example script in
app.jsonso 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.
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>
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 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> |
| 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" |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #965