-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Structural Mechanics Cases #7
base: master
Are you sure you want to change the base?
Changes from 2 commits
aef86d5
9abec2a
50654a7
068c2f4
7fbce47
9b8335d
c24496c
a752602
d3c1c57
d821956
b0352c5
eba8a6b
263722d
6bc5f6e
a77ca0a
03bc2c1
50ee40f
d998d8a
d95a9d7
9d4ddb1
5823155
06cd5aa
3f7970b
d2aebf8
2ec3e33
fed6253
be2a39d
a34de81
1b84156
37c9f18
bff6599
ad20de9
d85fdd9
2724d7f
c5e59d2
993a938
8f71882
51f1d15
efdd6ef
dd021fd
2f0b06a
d0086ef
71a142b
47c6d85
2eb96f4
d9b9f9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,54 @@ | ||||||
class StructuralMechanicSolver { | ||||||
constructor() { | ||||||
this.addInput("model_import_settings", "map"); // 0 | ||||||
this.addInput("material_import_settings", "map"); // 1 | ||||||
this.addOutput("solver_settings", "map"); | ||||||
this.properties = { | ||||||
"solver_type" : "Static", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
new syntax |
||||||
"model_part_name" : "Structure", | ||||||
"domain_size" : 2, | ||||||
"echo_level" : 0, | ||||||
"analysis_type" : "non_linear", | ||||||
"model_import_settings" : { | ||||||
"input_type" : "mdpa", | ||||||
"input_filename" : "Ring" | ||||||
}, | ||||||
"material_import_settings" : { | ||||||
"materials_filename" : "StructuralMaterials.json" | ||||||
}, | ||||||
"time_stepping" : { | ||||||
"time_step" : 1 | ||||||
}, | ||||||
"line_search" : false, | ||||||
"convergence_criterion" : "residual_criterion", | ||||||
"displacement_relative_tolerance" : 0.0001, | ||||||
"displacement_absolute_tolerance" : 1e-9, | ||||||
"residual_relative_tolerance" : 0.0001, | ||||||
"residual_absolute_tolerance" : 1e-9, | ||||||
"max_iteration" : 10, | ||||||
"rotation_dofs" : false, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be variable, can you expose it like the domain size? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think ricc wanted those to be modified directly from the properties There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, you know better :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the other GUIs this is automatically switched on depending on the user-defined elements. In this case, automating it would imply parsing the mpda (which we already do) and go through all the element types in the elements section. Not sure if this will be possible. What is not clear to me is how we can select this field from the properties (e.g. the properties of a shell element are almost identical to that of a 2D plane stress case without rotations). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is similar as the CL problem that appeared above. As @rubenzorrilla says we need to extract more info from the mpda, which is not a problem but also need to dynamically generate nodes based on inputs, which is something we are missing at the moment (but possible). I would leave it as is for this PR and make a separate one to implement those changes. |
||||||
"volumetric_strain_dofs" : false | ||||||
}, | ||||||
this.domain_size = this.addWidget("combo","Domain Size", 2, function(v){}, { values:[2,3]} ); | ||||||
|
||||||
this.size = this.computeSize(); | ||||||
} | ||||||
|
||||||
onExecute() { | ||||||
this._value = Object.assign({}, this.properties); | ||||||
this._value["domain_size"] = this.domain_size.value; | ||||||
this._value["model_import_settings"] = this.getInputData(0); | ||||||
this._value["material_import_settings"] = this.getInputData(1); | ||||||
|
||||||
// Get the | ||||||
|
||||||
this.setOutputData(0, this._value); | ||||||
} | ||||||
} | ||||||
|
||||||
StructuralMechanicSolver.title = "Structural mechanic solver"; | ||||||
StructuralMechanicSolver.desc = "Properties for the structural mechanic solver"; | ||||||
|
||||||
LiteGraph.registerNodeType("solver_settings/StructuralMechanicSolver", StructuralMechanicSolver); | ||||||
|
||||||
console.log("StructuralMechanicSolver node created"); //helps to debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for the filename.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done