Skip to content
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

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
aef86d5
A new structural solver box
WeiqSun97 May 27, 2021
9abec2a
Enable the new box created to be detected
WeiqSun97 May 27, 2021
50654a7
A change of the name of the solver_type
WeiqSun97 May 28, 2021
068c2f4
To type filename correctly
WeiqSun97 May 29, 2021
7fbce47
Enables new boxes to be detected
WeiqSun97 May 29, 2021
9b8335d
Set output name
WeiqSun97 May 29, 2021
c24496c
To define structural material properties
WeiqSun97 May 29, 2021
a752602
To define new outputs
WeiqSun97 May 29, 2021
d3c1c57
To merge several boolean into an array
WeiqSun97 May 29, 2021
d821956
To define boundary conditions
WeiqSun97 May 29, 2021
b0352c5
To define a time interval
WeiqSun97 May 29, 2021
eba8a6b
To define a constant load
WeiqSun97 May 29, 2021
263722d
To define a vector as an array
WeiqSun97 May 29, 2021
6bc5f6e
To be able typing input filename
WeiqSun97 May 29, 2021
a77ca0a
Project parameters for structural mechanics cases
WeiqSun97 May 29, 2021
03bc2c1
An example
WeiqSun97 May 29, 2021
50ee40f
Correction of the filename
WeiqSun97 May 31, 2021
d998d8a
Relocation
WeiqSun97 May 31, 2021
d95a9d7
Modification of the description
WeiqSun97 May 31, 2021
9d4ddb1
Correction of the filename, title and registration.
WeiqSun97 May 31, 2021
5823155
Rename the function
WeiqSun97 May 31, 2021
06cd5aa
Correction of the filename, title and registration.
WeiqSun97 May 31, 2021
3f7970b
Rename the function
WeiqSun97 May 31, 2021
d2aebf8
Correction of the description
WeiqSun97 May 31, 2021
2ec3e33
Merge remote-tracking branch 'origin/StructuralMechanicsWorkFlow' int…
WeiqSun97 May 31, 2021
fed6253
Delete merged code
WeiqSun97 Jun 1, 2021
be2a39d
Modification of a box due to a change of the box name
WeiqSun97 Jun 1, 2021
a34de81
Hyper reduced order model example
WeiqSun97 Jul 15, 2021
1b84156
New node to assign scalar variable to conditions process
WeiqSun97 Jul 15, 2021
37c9f18
Download file with correct extension
WeiqSun97 Jul 25, 2021
bff6599
Change of module name and node name
WeiqSun97 Jul 26, 2021
ad20de9
Add new force node
WeiqSun97 Jul 28, 2021
d85fdd9
More possible problem types
WeiqSun97 Jul 28, 2021
2724d7f
Add another problem type
WeiqSun97 Jul 28, 2021
c5e59d2
Actualization of the example
WeiqSun97 Jul 28, 2021
993a938
A new example
WeiqSun97 Jul 28, 2021
8f71882
No initializing the input filename
WeiqSun97 Jul 28, 2021
51f1d15
No initializing module names
WeiqSun97 Jul 28, 2021
efdd6ef
A new force node
WeiqSun97 Jul 28, 2021
dd021fd
Add a new possible model part name
WeiqSun97 Jul 28, 2021
2f0b06a
Erasing unused files
Rbravo555 Oct 13, 2021
d0086ef
Add an extra output from the Parsed Model Part: the file name.
Rbravo555 Oct 13, 2021
71a142b
Accept the file name as an input to the model import settings box
Rbravo555 Oct 13, 2021
47c6d85
adding default values in processes
Rbravo555 Oct 13, 2021
2eb96f4
Erasing some examples that still need more work
Rbravo555 Oct 14, 2021
d9b9f9d
Updating Structural Mechanics example
Rbravo555 Oct 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@

<!-- Solver settings for solvers -->
<script type="text/javascript" src="js/nodes/solver_settings/fluid_monolithic_solver.js"></script>
<script type="text/javascript" src="js/nodes/solver_settings/structural_mechanic_solver.js"></script>


<!-- Auxiliary nodes required by solver settings -->
<!-- Other nodes -->
Expand Down
54 changes: 54 additions & 0 deletions js/nodes/solver_settings/structural_mechanic_solver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
class StructuralMechanicSolver {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
class StructuralMechanicSolver {
class StructuralMechanicsSolver {

Same for the filename.

Copy link
Author

Choose a reason for hiding this comment

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

Done

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",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"solver_type" : "Static",
"solver_type" : "static",

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,
Copy link
Member

Choose a reason for hiding this comment

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

this should be variable, can you expose it like the domain size?

Copy link
Member

Choose a reason for hiding this comment

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

I think ricc wanted those to be modified directly from the properties

Copy link
Member

Choose a reason for hiding this comment

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

ok, you know better :)

Copy link
Member

Choose a reason for hiding this comment

The 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).

Copy link
Member

Choose a reason for hiding this comment

The 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