From aef86d5b2c4cf86a00efd129ee0f7e7de9d41d99 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Thu, 27 May 2021 21:19:48 +0200 Subject: [PATCH 01/45] A new structural solver box --- .../structural_mechanic_solver.js | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 js/nodes/solver_settings/structural_mechanic_solver.js diff --git a/js/nodes/solver_settings/structural_mechanic_solver.js b/js/nodes/solver_settings/structural_mechanic_solver.js new file mode 100644 index 0000000..b6cb433 --- /dev/null +++ b/js/nodes/solver_settings/structural_mechanic_solver.js @@ -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", + "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, + "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 \ No newline at end of file From 9abec2afd6eb67c736dba510a39b0e68b0e5f5da Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Thu, 27 May 2021 21:22:04 +0200 Subject: [PATCH 02/45] Enable the new box created to be detected --- index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.html b/index.html index 22b92dc..a7ffd23 100644 --- a/index.html +++ b/index.html @@ -55,6 +55,8 @@ + + From 50654a7cd564d704c8b0a60870d809daabfa9f1c Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Fri, 28 May 2021 10:55:34 +0200 Subject: [PATCH 03/45] A change of the name of the solver_type --- js/nodes/solver_settings/structural_mechanic_solver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/nodes/solver_settings/structural_mechanic_solver.js b/js/nodes/solver_settings/structural_mechanic_solver.js index b6cb433..725ba85 100644 --- a/js/nodes/solver_settings/structural_mechanic_solver.js +++ b/js/nodes/solver_settings/structural_mechanic_solver.js @@ -4,7 +4,7 @@ class StructuralMechanicSolver { this.addInput("material_import_settings", "map"); // 1 this.addOutput("solver_settings", "map"); this.properties = { - "solver_type" : "Static", + "solver_type" : "static", "model_part_name" : "Structure", "domain_size" : 2, "echo_level" : 0, From 068c2f43c72c12938101ef12a85de3288eb1ddac Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Sat, 29 May 2021 14:22:41 +0200 Subject: [PATCH 04/45] To type filename correctly --- js/nodes/download_problem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/nodes/download_problem.js b/js/nodes/download_problem.js index 4487851..17f08df 100644 --- a/js/nodes/download_problem.js +++ b/js/nodes/download_problem.js @@ -30,7 +30,7 @@ class DownloadProblem { zip.file("ProjectParameters.json", new Blob([str])); Object.entries(problem_files["materials"]).forEach(([key, value]) => { - zip.file(value["name"]+".json", new Blob([JSON.stringify(value["data"])])); + zip.file(value["name"], new Blob([JSON.stringify(value["data"])])); }); // var img = zip.folder("images"); From 7fbce47eda32d4c652fd4793540ba850d616b255 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Sat, 29 May 2021 14:43:00 +0200 Subject: [PATCH 05/45] Enables new boxes to be detected --- index.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/index.html b/index.html index a7ffd23..6d11e21 100644 --- a/index.html +++ b/index.html @@ -49,9 +49,12 @@ + + + @@ -68,6 +71,7 @@ + @@ -76,6 +80,11 @@ + + + + + From 9b8335def1a3c71ff74a01e6063f3b0929407796 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Sat, 29 May 2021 14:43:50 +0200 Subject: [PATCH 06/45] Set output name --- js/nodes/materials/materials_list.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/js/nodes/materials/materials_list.js b/js/nodes/materials/materials_list.js index d0b464c..cc6aa98 100644 --- a/js/nodes/materials/materials_list.js +++ b/js/nodes/materials/materials_list.js @@ -5,6 +5,17 @@ class MaterialsList extends InputList{ this.input_type = "material"; this.output_type = "material_array"; } + onExecute() { + if (!this._value) { + this._value = new Array(); + } + this._value.length = this.inputs.length - 1; + for (let i = 0; i < this.inputs.length - 1; ++i) { + this._value[i] = this.getInputData(i); + } + + this.setOutputData(0, {"properties":this._value}); + } }; MaterialsList.title = "Materials list"; From c24496c43d39c84b527e7de9c5d3eb8770585f62 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Sat, 29 May 2021 14:44:32 +0200 Subject: [PATCH 07/45] To define structural material properties --- js/nodes/materials/structural_material.js | 64 +++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 js/nodes/materials/structural_material.js diff --git a/js/nodes/materials/structural_material.js b/js/nodes/materials/structural_material.js new file mode 100644 index 0000000..d8ef2bb --- /dev/null +++ b/js/nodes/materials/structural_material.js @@ -0,0 +1,64 @@ +// TODO: Create a material base class +class StructuralMaterial { + constructor() + { + this.addInput("model_part_name","string"); + this.properties = { + "model_part_name" : "Structure.Parts_Solid_Solid_Auto1", + "properties_id" : 1, + "Material" : { + "constitutive_law" : { + "name" : "LinearElasticPlaneStress2DLaw" + }, + "Variables" : { + "DENSITY" : 7850.0, + "YOUNG_MODULUS" : 206900000000.0, + "POISSON_RATIO" : 0.29, + "THICKNESS" : 0.1 + }, + "Tables" : {} + } + }; + + this.properties_id = this.addWidget("combo","Properties_ID", 1, function(v){}, { values:[1, 2, 3, 4, 5]} ); + this.name = this.addWidget("text","Name", "LinearElasticPlaneStress2DLaw", function(v){}, function(v){}, {} ); + this.DENSITY= this.addWidget("number","Density", 7850.0, function(v){}, {}); + this.YOUNG_MODULUS = this.addWidget("number","Young_Modulus", 206900000000.0, function(v){}, {}); + this.POISSON_RATIO = this.addWidget("number","Poisson_Ratio", 0.29, function(v){}, {}); + this.THICKNESS = this.addWidget("number","Thinckness", 0.1, function(v){}, {}); + this.addInput("tables","process_array"); + this.addOutput("Material","material"); + + this.size = this.computeSize(); + } + + onExecute() + { + this._value = Object.assign({}, this.properties); + + // Current material model part + this._value["model_part_name"] = this.getInputData(0) + + // Table + if (this.getInputData(7) != undefined) { + this._value["Material"]["Table"] = this.getInputData(7) + } else { + this._value["Material"]["Table"]= this.properties["Table"] + } + this._value["properties_id"] = this.properties_id.value + this._value["Material"]["constitutive_law"]["name"] = this.name.value + this._value["Material"]["Variables"]["DENSITY"] = this.DENSITY.value + this._value["Material"]["Variables"]["YOUNG_MODULUS"] = this.YOUNG_MODULUS.value + this._value["Material"]["Variables"]["POISSON_RATIO"] = this.POISSON_RATIO.value + this._value["Material"]["Variables"]["THICKNESS"] = this.THICKNESS.value + + this.setOutputData(0, this._value); + } +} + +StructuralMaterial.title = "Structural material"; +StructuralMaterial.desc = "Node to specify a Structurall material."; + +LiteGraph.registerNodeType("materials/StructuralMaterial", StructuralMaterial); + +console.log("StructuralMaterialNew node created"); //helps to debug \ No newline at end of file From a7526028b4d40ad0b79870b7f777b3688a980069 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Sat, 29 May 2021 14:44:56 +0200 Subject: [PATCH 08/45] To define new outputs --- .../output_processes/gid_output_structural.js | 61 +++++++++++++++++++ .../output_processes/vtk_output_structural.js | 47 ++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 js/nodes/output_processes/gid_output_structural.js create mode 100644 js/nodes/output_processes/vtk_output_structural.js diff --git a/js/nodes/output_processes/gid_output_structural.js b/js/nodes/output_processes/gid_output_structural.js new file mode 100644 index 0000000..d86befe --- /dev/null +++ b/js/nodes/output_processes/gid_output_structural.js @@ -0,0 +1,61 @@ + +//********************************************************************/ +//********************************************************************/ +//********************************************************************/ +//********************************************************************/ +function GiDStructural() { + + this.addOutput("Process", "process"); + this.properties = { + "python_module" : "gid_output_process", + "kratos_module" : "KratosMultiphysics", + "process_name" : "GiDOutputProcess", + "help" : "This process writes postprocessing files for GiD", + "Parameters" : { + "model_part_name" : "Structure", + "output_name" : "SWQ", + "postprocess_parameters" : { + "result_file_configuration" : { + "gidpost_flags" : { + "GiDPostMode" : "GiD_PostBinary", + "WriteDeformedMeshFlag" : "WriteDeformed", + "WriteConditionsFlag" : "WriteConditions", + "MultiFileFlag" : "SingleFile" + }, + "file_label" : "step", + "output_control_type" : "step", + "output_interval" : 1, + "body_output" : true, + "node_output" : false, + "skin_output" : false, + "plane_output" : [], + "nodal_results" : ["DISPLACEMENT","REACTION"], + "gauss_point_results" : ["VON_MISES_STRESS"], + "nodal_nonhistorical_results" : [] + }, + "point_data_configuration" : [] + } + } + } + this.model_part_name = this.addWidget("text","ModelPartName", "Structure", function(v){}, {} ); + this.output_name = this.addWidget("text","OutputName", "SWQ", function(v){}, {} ); + + this.size = this.computeSize(); +} + +GiDStructural.title = "GiD structural"; +GiDStructural.desc = "Creates GiD structural"; + +GiDStructural.prototype.onExecute = function () { + output = this.properties + + output["Parameters"]["model_part_name"] = this.model_part_name.value; + output["Parameters"]["output_name"] = this.output_name.value; + + + this.setOutputData(0, output); +}; + +LiteGraph.registerNodeType("output_processes/GiDStructural", GiDStructural); + +console.log("GiD node created"); //helps to debug \ No newline at end of file diff --git a/js/nodes/output_processes/vtk_output_structural.js b/js/nodes/output_processes/vtk_output_structural.js new file mode 100644 index 0000000..78644a1 --- /dev/null +++ b/js/nodes/output_processes/vtk_output_structural.js @@ -0,0 +1,47 @@ + +//********************************************************************/ +//********************************************************************/ +//********************************************************************/ +//********************************************************************/ +function VTKStructural() { + + this.properties = { + "python_module" : "vtk_output_process", + "kratos_module" : "KratosMultiphysics", + "process_name" : "VtkOutputProcess", + "help" : "This process writes postprocessing files for Paraview", + "Parameters" : { + "model_part_name" : "Structure", + "output_control_type" : "step", + "output_interval" : 1, + "file_format" : "ascii", + "output_precision" : 7, + "output_sub_model_parts" : false, + "folder_name" : "vtk_output", + "save_output_files_in_folder" : true, + "nodal_solution_step_data_variables" : ["DISPLACEMENT","REACTION"], + "nodal_data_value_variables" : [], + "element_data_value_variables" : [], + "condition_data_value_variables" : [], + "gauss_point_variables_extrapolated_to_nodes" : ["VON_MISES_STRESS"] + } + } + this.addOutput("Process", "process"); + this.model_part_name = this.addWidget("text","ModelPartName", "Structure", function(v){}, {} ); + this.size = this.computeSize(); +} + +VTKStructural.title = "VTK structural"; +VTKStructural.desc = "Creates VTK"; + +VTKStructural.prototype.onExecute = function () { + output = this.properties + + output["Parameters"]["model_part_name"] = this.model_part_name.value; + + this.setOutputData(0, output); +}; + +LiteGraph.registerNodeType("output_processes/VTK_structural", VTKStructural); + +console.log("VTK node created"); //helps to debug \ No newline at end of file From d3c1c572f69d09315fe6743631ac7478ad49919e Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Sat, 29 May 2021 14:45:28 +0200 Subject: [PATCH 09/45] To merge several boolean into an array --- js/nodes/processes/boolean_list.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 js/nodes/processes/boolean_list.js diff --git a/js/nodes/processes/boolean_list.js b/js/nodes/processes/boolean_list.js new file mode 100644 index 0000000..19e4e10 --- /dev/null +++ b/js/nodes/processes/boolean_list.js @@ -0,0 +1,18 @@ + +function BooleanList (){ + this.addOutput("", "process_array"); + this.xposi = this.addWidget("toggle","x",true,); + this.yposi = this.addWidget("toggle","y",true,); + this.zposi = this.addWidget("toggle","z",true,); +} +BooleanList.title = "Boolean list"; +BooleanList.desc = "Merges several boolean into an array"; + +BooleanList.prototype.onExecute = function() { + this.setOutputData(0, [this.xposi.value, this.yposi.value, this.zposi.value]); +}; + + +LiteGraph.registerNodeType("processes/BooleanList", BooleanList); + +console.log("BooleanList node created"); //helps to debug From d821956e6bb53f9472e1a2ffb7ed4188ab3c94a7 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Sat, 29 May 2021 14:46:27 +0200 Subject: [PATCH 10/45] To define boundary conditions --- .../processes/constraints_process_list.js | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 js/nodes/processes/constraints_process_list.js diff --git a/js/nodes/processes/constraints_process_list.js b/js/nodes/processes/constraints_process_list.js new file mode 100644 index 0000000..9aa23b7 --- /dev/null +++ b/js/nodes/processes/constraints_process_list.js @@ -0,0 +1,72 @@ +function ConstraintsProcessList () { + this.addInput("model_part_name","string"); + this.addInput("interval","process_array"); + this.addInput("constrained","process_array"); + this.addInput("value","process_array") + + this.properties = { + + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "process_name" : "AssignVectorVariableProcess", + "Parameters" : { + "model_part_name" : "Structure.DISPLACEMENT_Displacement_Auto1", + "variable_name" : "DISPLACEMENT", + "interval" : [0.0,"End"], + "constrained" : [true,true,true], + "value" : [0.0,0.0,0.0] + } + }; + var that = this; + this.variable_name = this.addWidget("text","VariableName", "DISPLACEMENT", function(v){}, {} ); + + + this.addOutput("Process","process"); + + this.size = this.computeSize(); + this.serialize_widgets = true; + +} + + +ConstraintsProcessList.title = "Constraints process list"; +ConstraintsProcessList.desc = "Node to specify a boundary process."; + +ConstraintsProcessList.prototype.onExecute = function() { +myoutput = this.properties + // model_part_name + if (this.getInputData(0) != undefined) { + myoutput["Parameters"]["model_part_name"] = this.getInputData(0) + } else { + myoutput["Parameters"]["model_part_name"] = this.properties["Parameters"]["model_part_name"] + } + // interval + if (this.getInputData(1) != undefined) { + myoutput["Parameters"]["interval"] = this.getInputData(1) + } else { + myoutput["Parameters"]["interval"] = this.properties["Parameters"]["interval"] + } + + // constrained + if (this.getInputData(2) != undefined) { + myoutput["Parameters"]["constrained"] = this.getInputData(2) + } else { + myoutput["Parameters"]["constrained"] = this.properties["Parameters"]["constrained"] + } + + // value + if (this.getInputData(3) != undefined) { + myoutput["Parameters"]["value"] = this.getInputData(3) + } else { + myoutput["Parameters"]["value"] = this.properties["Parameters"]["value"] + } + + +myoutput["Parameters"]["variable_name"] = this.variable_name.value + +this.setOutputData(0, myoutput); +}; + +LiteGraph.registerNodeType("processes/ConstraintsProcessList", ConstraintsProcessList ); + +console.log("ConstraintsProcessList node created"); //helps to debug \ No newline at end of file From b0352c5038cb2b97c4bb5d2bd76313f3b87668fd Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Sat, 29 May 2021 14:46:45 +0200 Subject: [PATCH 11/45] To define a time interval --- js/nodes/processes/interval.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 js/nodes/processes/interval.js diff --git a/js/nodes/processes/interval.js b/js/nodes/processes/interval.js new file mode 100644 index 0000000..a0bc39a --- /dev/null +++ b/js/nodes/processes/interval.js @@ -0,0 +1,21 @@ + +function Interval(){ + this.addOutput("", "process_array"); + this.widget_1 = this.addWidget("number","Initial", 0, function(v){}, {}); + this.widget_2 = this.addWidget("text","Final", "End", function(v){}, {}); + + +}; + +Interval.title = "Interval"; +Interval.desc = "Time interval"; + +Interval.prototype.onExecute = function() { + this.setOutputData(0, [this.widget_1.value, this.widget_2.value]) +}; + +LiteGraph.registerNodeType("processes/interval", Interval); + +console.log("Interval node created"); //helps to debug + + \ No newline at end of file From eba8a6be2e529dc5d9dae4d33623b136169cd252 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Sat, 29 May 2021 14:47:03 +0200 Subject: [PATCH 12/45] To define a constant load --- js/nodes/processes/load_process_list.js | 63 +++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 js/nodes/processes/load_process_list.js diff --git a/js/nodes/processes/load_process_list.js b/js/nodes/processes/load_process_list.js new file mode 100644 index 0000000..863b555 --- /dev/null +++ b/js/nodes/processes/load_process_list.js @@ -0,0 +1,63 @@ + +function LoadProcessList() { + this.addInput("model_part_name","string"); + this.addInput("interval","process_array"); + this.addInput("direction","process_array"); + + this.properties = { + "python_module" : "assign_vector_by_direction_to_condition_process", + "kratos_module" : "KratosMultiphysics", + "check" : "DirectorVectorNonZero direction", + "process_name" : "AssignVectorByDirectionToConditionProcess", + "Parameters" : { + "model_part_name" : "Structure.LineLoad2D_Load_on_lines_Auto1", + "variable_name" : "LINE_LOAD", + "interval" : [0.0,"End"], + "modulus" : 100000.0, + "direction" : [0.0,-1,0.0] + } + + }; + + var that = this; + this.variable_name = this.addWidget("text","VariableName", "LINE_LOAD", function(v){}, {} ); + this.modulus = this.addWidget("number","Modulus", 100000, function(v){}, {}); + + + this.addOutput("Process","process"); + + this.size = this.computeSize(); + this.serialize_widgets = true; + + } + + LoadProcessList.title = "Load process list"; + LoadProcessList.desc = "Node to specify a load process"; + + LoadProcessList.prototype.onExecute = function() { + myoutput = this.properties + // model_part_name + if (this.getInputData(0) != undefined) { + myoutput["Parameters"]["model_part_name"] = this.getInputData(0) + } else { + myoutput["Parameters"]["model_part_name"] = this.properties["Parameters"]["model_part_name"] + } + // interval + if (this.getInputData(1) != undefined) { + myoutput["Parameters"]["interval"] = this.getInputData(1) + } else { + myoutput["Parameters"]["interval"] = this.properties["Parameters"]["interval"] + } + // direction + if (this.getInputData(2) != undefined) { + myoutput["Parameters"]["direction"] = this.getInputData(2) + } else { + myoutput["Parameters"]["direction"] = this.properties["Parameters"]["direction"] + } + myoutput["Parameters"]["variable_name"] = this.variable_name.value + myoutput["Parameters"]["modulus"] = this.modulus.value + + this.setOutputData(0, myoutput); + }; + + LiteGraph.registerNodeType("processes/LoadProcessList", LoadProcessList); \ No newline at end of file From 263722d5320b5f9af353795039c2f71a07cdd584 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Sat, 29 May 2021 14:47:25 +0200 Subject: [PATCH 13/45] To define a vector as an array --- js/nodes/processes/vector.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 js/nodes/processes/vector.js diff --git a/js/nodes/processes/vector.js b/js/nodes/processes/vector.js new file mode 100644 index 0000000..38521fe --- /dev/null +++ b/js/nodes/processes/vector.js @@ -0,0 +1,23 @@ + +function Vector () { + this.addOutput("", "process_array"); + this.widget_1 = this.addWidget("number","X", 0, function(v){}, {}); + this.widget_2 = this.addWidget("number","Y", 0, function(v){}, {}); + this.widget_3 = this.addWidget("number","Z", 0, function(v){}, {}); + +}; + +Vector.title = "Vector"; +Vector.desc = "Merges several number into an array"; + +LiteGraph.registerNodeType("processes/Vector", Vector); + +console.log("Vector node created"); //helps to debug + + +Vector.prototype.onExecute = function() { + this.setOutputData(0, [this.widget_1.value, this.widget_2.value, this.widget_3.value]) +}; + + + \ No newline at end of file From 6bc5f6e6b8abe806ef5cc4f0baf6e43be8154cfa Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Sat, 29 May 2021 14:47:56 +0200 Subject: [PATCH 14/45] To be able typing input filename --- js/nodes/solver_settings_aux_nodes/model_import_settings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/nodes/solver_settings_aux_nodes/model_import_settings.js b/js/nodes/solver_settings_aux_nodes/model_import_settings.js index 5146733..b7dc084 100644 --- a/js/nodes/solver_settings_aux_nodes/model_import_settings.js +++ b/js/nodes/solver_settings_aux_nodes/model_import_settings.js @@ -1,7 +1,7 @@ class ModelImportSettings { constructor() { - this.addInput("Input filename", "string"); + this.input_filename = this.addWidget("text", "Input filename", "SWQ", function (v) { }, {}); this.input_type = this.addWidget("combo", "Input type", "mdpa", function (v) { }, { values: ["mdpa", "rest"] }); this.properties = { @@ -16,7 +16,7 @@ class ModelImportSettings { onExecute() { this._value = Object.assign({}, this.properties); - this._value["input_filename"] = this.getInputData(0); + this._value["input_filename"] = this.input_filename.value; this._value["input_type"] = this.input_type.value; this.setOutputData(0, this._value); From a77ca0a975fd4768704340487f0531bc65342029 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Sat, 29 May 2021 14:48:30 +0200 Subject: [PATCH 15/45] Project parameters for structural mechanics cases --- js/nodes/structural_project_parameters.js | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 js/nodes/structural_project_parameters.js diff --git a/js/nodes/structural_project_parameters.js b/js/nodes/structural_project_parameters.js new file mode 100644 index 0000000..e9474ff --- /dev/null +++ b/js/nodes/structural_project_parameters.js @@ -0,0 +1,36 @@ +function StructuralProjectParameters() { + this.addInput("problem_data", "map"); + this.addInput("solver_settings", "map"); + this.addInput("constraints_process_list", "process_array"); + this.addInput("loads_process_list", "process_array"); + this.addInput("list_other_processes", "process_array"); + this.addInput("gid_output", "process_array"); + this.addInput("vtk_output", "process_array"); + + + this.addOutput("project_parameters","map"); + this.size = this.computeSize(); +} + +StructuralProjectParameters.title = "Structural Project Parameters"; +StructuralProjectParameters.desc = "create a Project Parmaters"; + +StructuralProjectParameters.prototype.onExecute = function() { + tmp = {}; + tmp["processes"] = {}; + tmp["output_processes"] = {}; + + tmp["problem_data"] = this.getInputData(0); //0 + tmp["solver_settings"] = this.getInputData(1); //1 + tmp["processes"]["constraints_process_list"] = this.getInputData(2); //2 + tmp["processes"]["loads_process_list"] = this.getInputData(3); //3 + tmp["processes"]["list_other_processes"] = this.getInputData(4); //4 + tmp["output_processes"] ["gid_output"]= this.getInputData(5); //5 + tmp["output_processes"] ["vtk_output"]= this.getInputData(6); //5 + + this.setOutputData(0, tmp); +}; + +LiteGraph.registerNodeType("parameters/StructuralProjectParameters", StructuralProjectParameters); + +console.log("ProjectParameters node created"); //helps to debug From 03bc2c1348af60708b811b9849f22eee5debd686 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Sat, 29 May 2021 14:48:41 +0200 Subject: [PATCH 16/45] An example --- resources/examples/StructuralMechanics.json.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 resources/examples/StructuralMechanics.json.json diff --git a/resources/examples/StructuralMechanics.json.json b/resources/examples/StructuralMechanics.json.json new file mode 100644 index 0000000..67bebe4 --- /dev/null +++ b/resources/examples/StructuralMechanics.json.json @@ -0,0 +1 @@ +{"last_node_id":206,"last_link_id":313,"nodes":[{"id":14,"type":"materials/materials_list","pos":[-16,-388],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":16,"mode":0,"inputs":[{"name":"In0","type":"material","link":290},{"name":"In1","type":"material","link":null}],"outputs":[{"name":"array","type":"material_array","links":[249]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":176,"type":"materials/Material Writer","pos":[134,-389],"size":{"0":210,"1":58},"flags":{},"order":19,"mode":0,"inputs":[{"name":"Material List","type":"material_array","link":249}],"outputs":[{"name":"Material","type":"string","links":[250]}],"properties":{}},{"id":177,"type":"solver_settings_aux_nodes/MaterialImportSettings","pos":[356,-390],"size":{"0":287.20001220703125,"1":26},"flags":{},"order":20,"mode":0,"inputs":[{"name":"Materials filename","type":"string","link":250}],"outputs":[{"name":"solver_settings","type":"map","links":[260]}],"properties":{"materials_filename":""}},{"id":172,"type":"solver_settings_aux_nodes/ModelImportSettings","pos":[442,-527],"size":{"0":210,"1":82},"flags":{},"order":0,"mode":0,"outputs":[{"name":"solver_settings","type":"map","links":[259]}],"properties":{"input_filename":""}},{"id":197,"type":"processes/interval","pos":[3,-76],"size":{"0":210,"1":82},"flags":{},"order":1,"mode":0,"outputs":[{"name":"","type":"process_array","links":[279]}],"properties":{}},{"id":195,"type":"processes/BooleanList","pos":[11,44],"size":{"0":210,"1":106},"flags":{},"order":2,"mode":0,"outputs":[{"name":"","type":"process_array","links":[280]}],"properties":{}},{"id":186,"type":"processes/Vector","pos":[3,194],"size":{"0":210,"1":106},"flags":{},"order":3,"mode":0,"outputs":[{"name":"","type":"process_array","links":[281]}],"properties":{}},{"id":199,"type":"processes/interval","pos":[5,393],"size":{"0":210,"1":82},"flags":{},"order":4,"mode":0,"outputs":[{"name":"","type":"process_array","links":[284]}],"properties":{}},{"id":200,"type":"processes/LoadProcessList","pos":[270,389],"size":{"0":210,"1":122},"flags":{},"order":15,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":287},{"name":"interval","type":"process_array","link":284},{"name":"direction","type":"process_array","link":285}],"outputs":[{"name":"Process","type":"process","links":[286]}],"properties":{"python_module":"assign_vector_by_direction_to_condition_process","kratos_module":"KratosMultiphysics","check":"DirectorVectorNonZero direction","process_name":"AssignVectorByDirectionToConditionProcess","Parameters":{"model_part_name":"Structure.LineLoad2D_Load_on_lines_Auto1","variable_name":"LINE_LOAD","interval":[0,"End"],"modulus":100000,"direction":[0,-1,0]}},"widgets_values":["LINE_LOAD",100000]},{"id":198,"type":"processes/ConstraintsProcessList","pos":[291,-109],"size":{"0":210,"1":118},"flags":{},"order":12,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":282},{"name":"interval","type":"process_array","link":279},{"name":"constrained","type":"process_array","link":280},{"name":"value","type":"process_array","link":281}],"outputs":[{"name":"Process","type":"process","links":[288]}],"properties":{"python_module":"assign_vector_variable_process","kratos_module":"KratosMultiphysics","process_name":"AssignVectorVariableProcess","Parameters":{"model_part_name":"Structure.DISPLACEMENT_Displacement_Auto1","variable_name":"DISPLACEMENT","interval":[0,"End"],"constrained":[true,true,true],"value":[0,0,0]}},"widgets_values":["DISPLACEMENT"]},{"id":149,"type":"model_part/ParsedModelPart","pos":[-929,-59],"size":{"0":278.79998779296875,"1":122},"flags":{},"order":5,"mode":0,"outputs":[{"name":".Parts_Solid_Solid_Auto1","type":"string","links":[289]},{"name":".DISPLACEMENT_Displacement_Auto1","type":"string","links":[282]},{"name":".LineLoad2D_Load_on_lines_Auto1","type":"string","links":[287]}],"properties":{"submodelpart_list":[".Parts_Solid_Solid_Auto1",".DISPLACEMENT_Displacement_Auto1",".LineLoad2D_Load_on_lines_Auto1"]},"widgets_values":["Structure",""]},{"id":201,"type":"materials/StructuralMaterial","pos":[-268,-397],"size":{"0":210,"1":198},"flags":{},"order":11,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":289},{"name":"tables","type":"process_array","link":null}],"outputs":[{"name":"Material","type":"material","links":[290]}],"properties":{"model_part_name":"Structure.Parts_Solid_Solid_Auto1","properties_id":1,"Material":{"constitutive_law":{"name":"LinearElasticPlaneStress2DLaw"},"Variables":{"DENSITY":7850,"YOUNG_MODULUS":206900000000,"POISSON_RATIO":0.29,"THICKNESS":0.1},"Tables":{}}}},{"id":202,"type":"output_processes/GiDStructural","pos":[995,448],"size":{"0":210,"1":82},"flags":{},"order":6,"mode":0,"outputs":[{"name":"Process","type":"process","links":[291]}],"properties":{"python_module":"gid_output_process","kratos_module":"KratosMultiphysics","process_name":"GiDOutputProcess","help":"This process writes postprocessing files for GiD","Parameters":{"model_part_name":"Structure","output_name":"SWQ","postprocess_parameters":{"result_file_configuration":{"gidpost_flags":{"GiDPostMode":"GiD_PostBinary","WriteDeformedMeshFlag":"WriteDeformed","WriteConditionsFlag":"WriteConditions","MultiFileFlag":"SingleFile"},"file_label":"step","output_control_type":"step","output_interval":1,"body_output":true,"node_output":false,"skin_output":false,"plane_output":[],"nodal_results":["DISPLACEMENT","REACTION"],"gauss_point_results":["VON_MISES_STRESS"],"nodal_nonhistorical_results":[]},"point_data_configuration":[]}}}},{"id":203,"type":"output_processes/VTK_structural","pos":[1010,585],"size":{"0":210,"1":58},"flags":{},"order":7,"mode":0,"outputs":[{"name":"Process","type":"process","links":[292]}],"properties":{"python_module":"vtk_output_process","kratos_module":"KratosMultiphysics","process_name":"VtkOutputProcess","help":"This process writes postprocessing files for Paraview","Parameters":{"model_part_name":"Structure","output_control_type":"step","output_interval":1,"file_format":"ascii","output_precision":7,"output_sub_model_parts":false,"folder_name":"vtk_output","save_output_files_in_folder":true,"nodal_solution_step_data_variables":["DISPLACEMENT","REACTION"],"nodal_data_value_variables":[],"element_data_value_variables":[],"condition_data_value_variables":[],"gauss_point_variables_extrapolated_to_nodes":["VON_MISES_STRESS"]}}},{"id":45,"type":"model_part/OutputView","pos":[2325,86],"size":{"0":473.22265625,"1":3110},"flags":{"collapsed":false},"order":24,"mode":0,"inputs":[{"name":"json","type":0,"link":313}],"properties":{}},{"id":23,"type":"processes/list","pos":[1236,572],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":14,"mode":0,"inputs":[{"name":"In0","type":"process","link":292},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[304]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":19,"type":"processes/list","pos":[1232,464],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":13,"mode":0,"inputs":[{"name":"In0","type":"process","link":291},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[305]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":168,"type":"processes/list","pos":[542,389],"size":{"0":140,"1":46},"flags":{},"order":18,"mode":0,"inputs":[{"name":"In0","type":"process","link":286},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[307]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":175,"type":"processes/list","pos":[546,-100],"size":{"0":140,"1":46},"flags":{},"order":17,"mode":0,"inputs":[{"name":"In0","type":"process","link":288},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[308]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":4,"type":"parameters/ProblemData","pos":[1562,-337],"size":{"0":140,"1":86},"flags":{"collapsed":false},"order":10,"mode":0,"outputs":[{"name":"problem_data","type":"map","links":[310]},{"name":"problem_name","type":"string","links":null},{"name":"start_time","type":"number","links":null},{"name":"end_time","type":"number","links":null}],"properties":{"problem_name":"SWQ","parallel_type":"OpenMP","echo_level":1,"start_time":0,"end_time":10}},{"id":182,"type":"solver_settings/StructuralMechanicSolver","pos":[768,-410],"size":{"0":337.6000061035156,"1":78},"flags":{},"order":21,"mode":0,"inputs":[{"name":"model_import_settings","type":"map","link":259},{"name":"material_import_settings","type":"map","link":260}],"outputs":[{"name":"solver_settings","type":"map","links":[311]}],"properties":{"solver_type":"static","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,"volumetric_strain_dofs":false}},{"id":206,"type":"parameters/StructuralProjectParameters","pos":[1865,-34],"size":{"0":362.79998779296875,"1":146},"flags":{},"order":22,"mode":0,"inputs":[{"name":"problem_data","type":"map","link":310},{"name":"solver_settings","type":"map","link":311},{"name":"constraints_process_list","type":"process_array","link":308},{"name":"loads_process_list","type":"process_array","link":307},{"name":"list_other_processes","type":"process_array","link":306},{"name":"gid_output","type":"process_array","link":305},{"name":"vtk_output","type":"process_array","link":304}],"outputs":[{"name":"project_parameters","type":"map","links":[312,313]}],"properties":{}},{"id":204,"type":"processes/list","pos":[1523,180],"size":{"0":140,"1":46},"flags":{},"order":9,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[306]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":189,"type":"processes/Vector","pos":[9,513],"size":{"0":210,"1":106},"flags":{},"order":8,"mode":0,"outputs":[{"name":"","type":"process_array","links":[285]}],"properties":{}},{"id":32,"type":"basic/DownloadProblem","pos":[2334,-24],"size":{"0":210,"1":78},"flags":{"collapsed":false},"order":23,"mode":0,"inputs":[{"name":"data","type":0,"link":312},{"name":"download","type":-1,"link":null}],"properties":{"filename":"data.json"}}],"links":[[249,14,0,176,0,"material_array"],[250,176,0,177,0,"string"],[259,172,0,182,0,"map"],[260,177,0,182,1,"map"],[279,197,0,198,1,"process_array"],[280,195,0,198,2,"process_array"],[281,186,0,198,3,"process_array"],[282,149,1,198,0,"string"],[284,199,0,200,1,"process_array"],[285,189,0,200,2,"process_array"],[286,200,0,168,0,"process"],[287,149,2,200,0,"string"],[288,198,0,175,0,"process"],[289,149,0,201,0,"string"],[290,201,0,14,0,"material"],[291,202,0,19,0,"process"],[292,203,0,23,0,"process"],[304,23,0,206,6,"process_array"],[305,19,0,206,5,"process_array"],[306,204,0,206,4,"process_array"],[307,168,0,206,3,"process_array"],[308,175,0,206,2,"process_array"],[310,4,0,206,0,"map"],[311,182,0,206,1,"map"],[312,206,0,32,0,0],[313,206,0,45,0,0]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file From 50ee40f4e573f23189e173ea3ef98dc76374d019 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Mon, 31 May 2021 22:24:21 +0200 Subject: [PATCH 17/45] Correction of the filename --- .../{StructuralMechanics.json.json => StructuralMechanics.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename resources/examples/{StructuralMechanics.json.json => StructuralMechanics.json} (100%) diff --git a/resources/examples/StructuralMechanics.json.json b/resources/examples/StructuralMechanics.json similarity index 100% rename from resources/examples/StructuralMechanics.json.json rename to resources/examples/StructuralMechanics.json From d998d8a03f0df03d1a686244ea0a3d135f479f28 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Mon, 31 May 2021 22:40:35 +0200 Subject: [PATCH 18/45] Relocation --- index.html | 3 +++ js/nodes/{processes => input}/interval.js | 0 2 files changed, 3 insertions(+) rename js/nodes/{processes => input}/interval.js (100%) diff --git a/index.html b/index.html index 6d11e21..9fea4e6 100644 --- a/index.html +++ b/index.html @@ -86,6 +86,9 @@ + + + diff --git a/js/nodes/processes/interval.js b/js/nodes/input/interval.js similarity index 100% rename from js/nodes/processes/interval.js rename to js/nodes/input/interval.js From d95a9d7464f15b9d82ad757010da2e5012d8a2e0 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Mon, 31 May 2021 22:51:30 +0200 Subject: [PATCH 19/45] Modification of the description --- js/nodes/structural_project_parameters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/nodes/structural_project_parameters.js b/js/nodes/structural_project_parameters.js index e9474ff..c29ff48 100644 --- a/js/nodes/structural_project_parameters.js +++ b/js/nodes/structural_project_parameters.js @@ -13,7 +13,7 @@ function StructuralProjectParameters() { } StructuralProjectParameters.title = "Structural Project Parameters"; -StructuralProjectParameters.desc = "create a Project Parmaters"; +StructuralProjectParameters.desc = "Create a Project Parmaters"; StructuralProjectParameters.prototype.onExecute = function() { tmp = {}; From 9d4ddb105909683958187991c4c4ecb42251b76a Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Mon, 31 May 2021 23:01:24 +0200 Subject: [PATCH 20/45] Correction of the filename, title and registration. --- index.html | 2 +- ...chanic_solver.js => structural_mechanics_solver.js} | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename js/nodes/solver_settings/{structural_mechanic_solver.js => structural_mechanics_solver.js} (84%) diff --git a/index.html b/index.html index 9fea4e6..d0de935 100644 --- a/index.html +++ b/index.html @@ -58,7 +58,7 @@ - + diff --git a/js/nodes/solver_settings/structural_mechanic_solver.js b/js/nodes/solver_settings/structural_mechanics_solver.js similarity index 84% rename from js/nodes/solver_settings/structural_mechanic_solver.js rename to js/nodes/solver_settings/structural_mechanics_solver.js index 725ba85..c93b8b4 100644 --- a/js/nodes/solver_settings/structural_mechanic_solver.js +++ b/js/nodes/solver_settings/structural_mechanics_solver.js @@ -1,4 +1,4 @@ -class StructuralMechanicSolver { +class StructuralMechanicsSolver { constructor() { this.addInput("model_import_settings", "map"); // 0 this.addInput("material_import_settings", "map"); // 1 @@ -46,9 +46,9 @@ class StructuralMechanicSolver { } } -StructuralMechanicSolver.title = "Structural mechanic solver"; -StructuralMechanicSolver.desc = "Properties for the structural mechanic solver"; +StructuralMechanicsSolver.title = "Structural mechanics solver"; +StructuralMechanicsSolver.desc = "Properties for the structural mechanics solver"; -LiteGraph.registerNodeType("solver_settings/StructuralMechanicSolver", StructuralMechanicSolver); +LiteGraph.registerNodeType("solver_settings/StructuralMechanicsSolver", StructuralMechanicsSolver); -console.log("StructuralMechanicSolver node created"); //helps to debug \ No newline at end of file +console.log("StructuralMechanicsSolver node created"); //helps to debug \ No newline at end of file From 5823155fc0c3734ef363c49773590d4037f80e9e Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Mon, 31 May 2021 23:14:01 +0200 Subject: [PATCH 21/45] Rename the function --- js/nodes/processes/constraints_process_list.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/nodes/processes/constraints_process_list.js b/js/nodes/processes/constraints_process_list.js index 9aa23b7..0b4ff37 100644 --- a/js/nodes/processes/constraints_process_list.js +++ b/js/nodes/processes/constraints_process_list.js @@ -1,4 +1,4 @@ -function ConstraintsProcessList () { +function AssignVectorVariableProcess () { this.addInput("model_part_name","string"); this.addInput("interval","process_array"); this.addInput("constrained","process_array"); @@ -29,10 +29,10 @@ function ConstraintsProcessList () { } -ConstraintsProcessList.title = "Constraints process list"; -ConstraintsProcessList.desc = "Node to specify a boundary process."; +AssignVectorVariableProcess.title = "Constraints process list"; +AssignVectorVariableProcess.desc = "Node to specify a boundary process."; -ConstraintsProcessList.prototype.onExecute = function() { +AssignVectorVariableProcess.prototype.onExecute = function() { myoutput = this.properties // model_part_name if (this.getInputData(0) != undefined) { @@ -67,6 +67,6 @@ myoutput["Parameters"]["variable_name"] = this.variable_name.value this.setOutputData(0, myoutput); }; -LiteGraph.registerNodeType("processes/ConstraintsProcessList", ConstraintsProcessList ); +LiteGraph.registerNodeType("processes/ConstraintsProcessList", AssignVectorVariableProcess ); console.log("ConstraintsProcessList node created"); //helps to debug \ No newline at end of file From 06cd5aaa4d9a3728e307276ade109fe0bda4a601 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Mon, 31 May 2021 23:01:24 +0200 Subject: [PATCH 22/45] Correction of the filename, title and registration. --- index.html | 2 +- ...chanic_solver.js => structural_mechanics_solver.js} | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename js/nodes/solver_settings/{structural_mechanic_solver.js => structural_mechanics_solver.js} (84%) diff --git a/index.html b/index.html index 9fea4e6..d0de935 100644 --- a/index.html +++ b/index.html @@ -58,7 +58,7 @@ - + diff --git a/js/nodes/solver_settings/structural_mechanic_solver.js b/js/nodes/solver_settings/structural_mechanics_solver.js similarity index 84% rename from js/nodes/solver_settings/structural_mechanic_solver.js rename to js/nodes/solver_settings/structural_mechanics_solver.js index 725ba85..c93b8b4 100644 --- a/js/nodes/solver_settings/structural_mechanic_solver.js +++ b/js/nodes/solver_settings/structural_mechanics_solver.js @@ -1,4 +1,4 @@ -class StructuralMechanicSolver { +class StructuralMechanicsSolver { constructor() { this.addInput("model_import_settings", "map"); // 0 this.addInput("material_import_settings", "map"); // 1 @@ -46,9 +46,9 @@ class StructuralMechanicSolver { } } -StructuralMechanicSolver.title = "Structural mechanic solver"; -StructuralMechanicSolver.desc = "Properties for the structural mechanic solver"; +StructuralMechanicsSolver.title = "Structural mechanics solver"; +StructuralMechanicsSolver.desc = "Properties for the structural mechanics solver"; -LiteGraph.registerNodeType("solver_settings/StructuralMechanicSolver", StructuralMechanicSolver); +LiteGraph.registerNodeType("solver_settings/StructuralMechanicsSolver", StructuralMechanicsSolver); -console.log("StructuralMechanicSolver node created"); //helps to debug \ No newline at end of file +console.log("StructuralMechanicsSolver node created"); //helps to debug \ No newline at end of file From 3f7970b7bc81f0b42911c24f1a91662202284b08 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Mon, 31 May 2021 23:14:01 +0200 Subject: [PATCH 23/45] Rename the function --- js/nodes/processes/constraints_process_list.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/nodes/processes/constraints_process_list.js b/js/nodes/processes/constraints_process_list.js index 9aa23b7..0b4ff37 100644 --- a/js/nodes/processes/constraints_process_list.js +++ b/js/nodes/processes/constraints_process_list.js @@ -1,4 +1,4 @@ -function ConstraintsProcessList () { +function AssignVectorVariableProcess () { this.addInput("model_part_name","string"); this.addInput("interval","process_array"); this.addInput("constrained","process_array"); @@ -29,10 +29,10 @@ function ConstraintsProcessList () { } -ConstraintsProcessList.title = "Constraints process list"; -ConstraintsProcessList.desc = "Node to specify a boundary process."; +AssignVectorVariableProcess.title = "Constraints process list"; +AssignVectorVariableProcess.desc = "Node to specify a boundary process."; -ConstraintsProcessList.prototype.onExecute = function() { +AssignVectorVariableProcess.prototype.onExecute = function() { myoutput = this.properties // model_part_name if (this.getInputData(0) != undefined) { @@ -67,6 +67,6 @@ myoutput["Parameters"]["variable_name"] = this.variable_name.value this.setOutputData(0, myoutput); }; -LiteGraph.registerNodeType("processes/ConstraintsProcessList", ConstraintsProcessList ); +LiteGraph.registerNodeType("processes/ConstraintsProcessList", AssignVectorVariableProcess ); console.log("ConstraintsProcessList node created"); //helps to debug \ No newline at end of file From d2aebf8892673f54a1e9d79b9c994a9bd27bf5ae Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Mon, 31 May 2021 23:19:31 +0200 Subject: [PATCH 24/45] Correction of the description --- js/nodes/structural_project_parameters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/nodes/structural_project_parameters.js b/js/nodes/structural_project_parameters.js index e9474ff..335c1b0 100644 --- a/js/nodes/structural_project_parameters.js +++ b/js/nodes/structural_project_parameters.js @@ -13,7 +13,7 @@ function StructuralProjectParameters() { } StructuralProjectParameters.title = "Structural Project Parameters"; -StructuralProjectParameters.desc = "create a Project Parmaters"; +StructuralProjectParameters.desc = "Create a Project Paramaters"; StructuralProjectParameters.prototype.onExecute = function() { tmp = {}; From fed6253d26752f5ed3e818e86f2efee969062537 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Tue, 1 Jun 2021 08:43:52 +0200 Subject: [PATCH 25/45] Delete merged code --- js/nodes/structural_project_parameters.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/js/nodes/structural_project_parameters.js b/js/nodes/structural_project_parameters.js index d130434..335c1b0 100644 --- a/js/nodes/structural_project_parameters.js +++ b/js/nodes/structural_project_parameters.js @@ -13,11 +13,7 @@ function StructuralProjectParameters() { } StructuralProjectParameters.title = "Structural Project Parameters"; -<<<<<<< HEAD StructuralProjectParameters.desc = "Create a Project Paramaters"; -======= -StructuralProjectParameters.desc = "Create a Project Parmaters"; ->>>>>>> StructuralMechanicsWorkFlow StructuralProjectParameters.prototype.onExecute = function() { tmp = {}; From be2a39df3222f8f0ec6163981ab4246f848b65fa Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Tue, 1 Jun 2021 21:33:45 +0200 Subject: [PATCH 26/45] Modification of a box due to a change of the box name --- resources/examples/StructuralMechanics.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/examples/StructuralMechanics.json b/resources/examples/StructuralMechanics.json index 67bebe4..bf46623 100644 --- a/resources/examples/StructuralMechanics.json +++ b/resources/examples/StructuralMechanics.json @@ -1 +1 @@ -{"last_node_id":206,"last_link_id":313,"nodes":[{"id":14,"type":"materials/materials_list","pos":[-16,-388],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":16,"mode":0,"inputs":[{"name":"In0","type":"material","link":290},{"name":"In1","type":"material","link":null}],"outputs":[{"name":"array","type":"material_array","links":[249]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":176,"type":"materials/Material Writer","pos":[134,-389],"size":{"0":210,"1":58},"flags":{},"order":19,"mode":0,"inputs":[{"name":"Material List","type":"material_array","link":249}],"outputs":[{"name":"Material","type":"string","links":[250]}],"properties":{}},{"id":177,"type":"solver_settings_aux_nodes/MaterialImportSettings","pos":[356,-390],"size":{"0":287.20001220703125,"1":26},"flags":{},"order":20,"mode":0,"inputs":[{"name":"Materials filename","type":"string","link":250}],"outputs":[{"name":"solver_settings","type":"map","links":[260]}],"properties":{"materials_filename":""}},{"id":172,"type":"solver_settings_aux_nodes/ModelImportSettings","pos":[442,-527],"size":{"0":210,"1":82},"flags":{},"order":0,"mode":0,"outputs":[{"name":"solver_settings","type":"map","links":[259]}],"properties":{"input_filename":""}},{"id":197,"type":"processes/interval","pos":[3,-76],"size":{"0":210,"1":82},"flags":{},"order":1,"mode":0,"outputs":[{"name":"","type":"process_array","links":[279]}],"properties":{}},{"id":195,"type":"processes/BooleanList","pos":[11,44],"size":{"0":210,"1":106},"flags":{},"order":2,"mode":0,"outputs":[{"name":"","type":"process_array","links":[280]}],"properties":{}},{"id":186,"type":"processes/Vector","pos":[3,194],"size":{"0":210,"1":106},"flags":{},"order":3,"mode":0,"outputs":[{"name":"","type":"process_array","links":[281]}],"properties":{}},{"id":199,"type":"processes/interval","pos":[5,393],"size":{"0":210,"1":82},"flags":{},"order":4,"mode":0,"outputs":[{"name":"","type":"process_array","links":[284]}],"properties":{}},{"id":200,"type":"processes/LoadProcessList","pos":[270,389],"size":{"0":210,"1":122},"flags":{},"order":15,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":287},{"name":"interval","type":"process_array","link":284},{"name":"direction","type":"process_array","link":285}],"outputs":[{"name":"Process","type":"process","links":[286]}],"properties":{"python_module":"assign_vector_by_direction_to_condition_process","kratos_module":"KratosMultiphysics","check":"DirectorVectorNonZero direction","process_name":"AssignVectorByDirectionToConditionProcess","Parameters":{"model_part_name":"Structure.LineLoad2D_Load_on_lines_Auto1","variable_name":"LINE_LOAD","interval":[0,"End"],"modulus":100000,"direction":[0,-1,0]}},"widgets_values":["LINE_LOAD",100000]},{"id":198,"type":"processes/ConstraintsProcessList","pos":[291,-109],"size":{"0":210,"1":118},"flags":{},"order":12,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":282},{"name":"interval","type":"process_array","link":279},{"name":"constrained","type":"process_array","link":280},{"name":"value","type":"process_array","link":281}],"outputs":[{"name":"Process","type":"process","links":[288]}],"properties":{"python_module":"assign_vector_variable_process","kratos_module":"KratosMultiphysics","process_name":"AssignVectorVariableProcess","Parameters":{"model_part_name":"Structure.DISPLACEMENT_Displacement_Auto1","variable_name":"DISPLACEMENT","interval":[0,"End"],"constrained":[true,true,true],"value":[0,0,0]}},"widgets_values":["DISPLACEMENT"]},{"id":149,"type":"model_part/ParsedModelPart","pos":[-929,-59],"size":{"0":278.79998779296875,"1":122},"flags":{},"order":5,"mode":0,"outputs":[{"name":".Parts_Solid_Solid_Auto1","type":"string","links":[289]},{"name":".DISPLACEMENT_Displacement_Auto1","type":"string","links":[282]},{"name":".LineLoad2D_Load_on_lines_Auto1","type":"string","links":[287]}],"properties":{"submodelpart_list":[".Parts_Solid_Solid_Auto1",".DISPLACEMENT_Displacement_Auto1",".LineLoad2D_Load_on_lines_Auto1"]},"widgets_values":["Structure",""]},{"id":201,"type":"materials/StructuralMaterial","pos":[-268,-397],"size":{"0":210,"1":198},"flags":{},"order":11,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":289},{"name":"tables","type":"process_array","link":null}],"outputs":[{"name":"Material","type":"material","links":[290]}],"properties":{"model_part_name":"Structure.Parts_Solid_Solid_Auto1","properties_id":1,"Material":{"constitutive_law":{"name":"LinearElasticPlaneStress2DLaw"},"Variables":{"DENSITY":7850,"YOUNG_MODULUS":206900000000,"POISSON_RATIO":0.29,"THICKNESS":0.1},"Tables":{}}}},{"id":202,"type":"output_processes/GiDStructural","pos":[995,448],"size":{"0":210,"1":82},"flags":{},"order":6,"mode":0,"outputs":[{"name":"Process","type":"process","links":[291]}],"properties":{"python_module":"gid_output_process","kratos_module":"KratosMultiphysics","process_name":"GiDOutputProcess","help":"This process writes postprocessing files for GiD","Parameters":{"model_part_name":"Structure","output_name":"SWQ","postprocess_parameters":{"result_file_configuration":{"gidpost_flags":{"GiDPostMode":"GiD_PostBinary","WriteDeformedMeshFlag":"WriteDeformed","WriteConditionsFlag":"WriteConditions","MultiFileFlag":"SingleFile"},"file_label":"step","output_control_type":"step","output_interval":1,"body_output":true,"node_output":false,"skin_output":false,"plane_output":[],"nodal_results":["DISPLACEMENT","REACTION"],"gauss_point_results":["VON_MISES_STRESS"],"nodal_nonhistorical_results":[]},"point_data_configuration":[]}}}},{"id":203,"type":"output_processes/VTK_structural","pos":[1010,585],"size":{"0":210,"1":58},"flags":{},"order":7,"mode":0,"outputs":[{"name":"Process","type":"process","links":[292]}],"properties":{"python_module":"vtk_output_process","kratos_module":"KratosMultiphysics","process_name":"VtkOutputProcess","help":"This process writes postprocessing files for Paraview","Parameters":{"model_part_name":"Structure","output_control_type":"step","output_interval":1,"file_format":"ascii","output_precision":7,"output_sub_model_parts":false,"folder_name":"vtk_output","save_output_files_in_folder":true,"nodal_solution_step_data_variables":["DISPLACEMENT","REACTION"],"nodal_data_value_variables":[],"element_data_value_variables":[],"condition_data_value_variables":[],"gauss_point_variables_extrapolated_to_nodes":["VON_MISES_STRESS"]}}},{"id":45,"type":"model_part/OutputView","pos":[2325,86],"size":{"0":473.22265625,"1":3110},"flags":{"collapsed":false},"order":24,"mode":0,"inputs":[{"name":"json","type":0,"link":313}],"properties":{}},{"id":23,"type":"processes/list","pos":[1236,572],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":14,"mode":0,"inputs":[{"name":"In0","type":"process","link":292},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[304]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":19,"type":"processes/list","pos":[1232,464],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":13,"mode":0,"inputs":[{"name":"In0","type":"process","link":291},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[305]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":168,"type":"processes/list","pos":[542,389],"size":{"0":140,"1":46},"flags":{},"order":18,"mode":0,"inputs":[{"name":"In0","type":"process","link":286},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[307]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":175,"type":"processes/list","pos":[546,-100],"size":{"0":140,"1":46},"flags":{},"order":17,"mode":0,"inputs":[{"name":"In0","type":"process","link":288},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[308]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":4,"type":"parameters/ProblemData","pos":[1562,-337],"size":{"0":140,"1":86},"flags":{"collapsed":false},"order":10,"mode":0,"outputs":[{"name":"problem_data","type":"map","links":[310]},{"name":"problem_name","type":"string","links":null},{"name":"start_time","type":"number","links":null},{"name":"end_time","type":"number","links":null}],"properties":{"problem_name":"SWQ","parallel_type":"OpenMP","echo_level":1,"start_time":0,"end_time":10}},{"id":182,"type":"solver_settings/StructuralMechanicSolver","pos":[768,-410],"size":{"0":337.6000061035156,"1":78},"flags":{},"order":21,"mode":0,"inputs":[{"name":"model_import_settings","type":"map","link":259},{"name":"material_import_settings","type":"map","link":260}],"outputs":[{"name":"solver_settings","type":"map","links":[311]}],"properties":{"solver_type":"static","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,"volumetric_strain_dofs":false}},{"id":206,"type":"parameters/StructuralProjectParameters","pos":[1865,-34],"size":{"0":362.79998779296875,"1":146},"flags":{},"order":22,"mode":0,"inputs":[{"name":"problem_data","type":"map","link":310},{"name":"solver_settings","type":"map","link":311},{"name":"constraints_process_list","type":"process_array","link":308},{"name":"loads_process_list","type":"process_array","link":307},{"name":"list_other_processes","type":"process_array","link":306},{"name":"gid_output","type":"process_array","link":305},{"name":"vtk_output","type":"process_array","link":304}],"outputs":[{"name":"project_parameters","type":"map","links":[312,313]}],"properties":{}},{"id":204,"type":"processes/list","pos":[1523,180],"size":{"0":140,"1":46},"flags":{},"order":9,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[306]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":189,"type":"processes/Vector","pos":[9,513],"size":{"0":210,"1":106},"flags":{},"order":8,"mode":0,"outputs":[{"name":"","type":"process_array","links":[285]}],"properties":{}},{"id":32,"type":"basic/DownloadProblem","pos":[2334,-24],"size":{"0":210,"1":78},"flags":{"collapsed":false},"order":23,"mode":0,"inputs":[{"name":"data","type":0,"link":312},{"name":"download","type":-1,"link":null}],"properties":{"filename":"data.json"}}],"links":[[249,14,0,176,0,"material_array"],[250,176,0,177,0,"string"],[259,172,0,182,0,"map"],[260,177,0,182,1,"map"],[279,197,0,198,1,"process_array"],[280,195,0,198,2,"process_array"],[281,186,0,198,3,"process_array"],[282,149,1,198,0,"string"],[284,199,0,200,1,"process_array"],[285,189,0,200,2,"process_array"],[286,200,0,168,0,"process"],[287,149,2,200,0,"string"],[288,198,0,175,0,"process"],[289,149,0,201,0,"string"],[290,201,0,14,0,"material"],[291,202,0,19,0,"process"],[292,203,0,23,0,"process"],[304,23,0,206,6,"process_array"],[305,19,0,206,5,"process_array"],[306,204,0,206,4,"process_array"],[307,168,0,206,3,"process_array"],[308,175,0,206,2,"process_array"],[310,4,0,206,0,"map"],[311,182,0,206,1,"map"],[312,206,0,32,0,0],[313,206,0,45,0,0]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file +{"last_node_id":207,"last_link_id":316,"nodes":[{"id":175,"type":"processes/list","pos":[546,-100],"size":{"0":140,"1":46},"flags":{},"order":17,"mode":0,"inputs":[{"name":"In0","type":"process","link":288},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[308]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":201,"type":"materials/StructuralMaterial","pos":[-559,-428],"size":{"0":210,"1":198},"flags":{},"order":11,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":289},{"name":"tables","type":"process_array","link":null}],"outputs":[{"name":"Material","type":"material","links":[290]}],"properties":{"model_part_name":"Structure.Parts_Solid_Solid_Auto1","properties_id":1,"Material":{"constitutive_law":{"name":"LinearElasticPlaneStress2DLaw"},"Variables":{"DENSITY":7850,"YOUNG_MODULUS":206900000000,"POISSON_RATIO":0.29,"THICKNESS":0.1},"Tables":{}}}},{"id":197,"type":"processes/interval","pos":[-420,-188],"size":{"0":210,"1":82},"flags":{},"order":0,"mode":0,"outputs":[{"name":"","type":"process_array","links":[279]}],"properties":{}},{"id":198,"type":"processes/ConstraintsProcessList","pos":[-132,-190],"size":{"0":210,"1":118},"flags":{},"order":12,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":282},{"name":"interval","type":"process_array","link":279},{"name":"constrained","type":"process_array","link":280},{"name":"value","type":"process_array","link":281}],"outputs":[{"name":"Process","type":"process","links":[288]}],"properties":{"python_module":"assign_vector_variable_process","kratos_module":"KratosMultiphysics","process_name":"AssignVectorVariableProcess","Parameters":{"model_part_name":"Structure.DISPLACEMENT_Displacement_Auto1","variable_name":"DISPLACEMENT","interval":[0,"End"],"constrained":[true,true,true],"value":[0,0,0]}},"widgets_values":["DISPLACEMENT"]},{"id":195,"type":"processes/BooleanList","pos":[-427,-63],"size":{"0":210,"1":106},"flags":{},"order":1,"mode":0,"outputs":[{"name":"","type":"process_array","links":[280]}],"properties":{}},{"id":186,"type":"processes/Vector","pos":[-423,84],"size":{"0":210,"1":106},"flags":{},"order":2,"mode":0,"outputs":[{"name":"","type":"process_array","links":[281]}],"properties":{}},{"id":4,"type":"parameters/ProblemData","pos":[558,-298],"size":{"0":140,"1":86},"flags":{"collapsed":false},"order":7,"mode":0,"outputs":[{"name":"problem_data","type":"map","links":[310]},{"name":"problem_name","type":"string","links":null},{"name":"start_time","type":"number","links":null},{"name":"end_time","type":"number","links":null}],"properties":{"problem_name":"SWQ","parallel_type":"OpenMP","echo_level":1,"start_time":0,"end_time":10}},{"id":200,"type":"processes/LoadProcessList","pos":[-395,282],"size":{"0":210,"1":122},"flags":{},"order":15,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":287},{"name":"interval","type":"process_array","link":284},{"name":"direction","type":"process_array","link":285}],"outputs":[{"name":"Process","type":"process","links":[286]}],"properties":{"python_module":"assign_vector_by_direction_to_condition_process","kratos_module":"KratosMultiphysics","check":"DirectorVectorNonZero direction","process_name":"AssignVectorByDirectionToConditionProcess","Parameters":{"model_part_name":"Structure.LineLoad2D_Load_on_lines_Auto1","variable_name":"LINE_LOAD","interval":[0,"End"],"modulus":100000,"direction":[0,-1,0]}},"widgets_values":["LINE_LOAD",100000]},{"id":168,"type":"processes/list","pos":[-147,276],"size":{"0":140,"1":46},"flags":{},"order":18,"mode":0,"inputs":[{"name":"In0","type":"process","link":286},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[307]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":206,"type":"parameters/StructuralProjectParameters","pos":[1008,-130],"size":{"0":362.79998779296875,"1":146},"flags":{},"order":22,"mode":0,"inputs":[{"name":"problem_data","type":"map","link":310},{"name":"solver_settings","type":"map","link":316},{"name":"constraints_process_list","type":"process_array","link":308},{"name":"loads_process_list","type":"process_array","link":307},{"name":"list_other_processes","type":"process_array","link":306},{"name":"gid_output","type":"process_array","link":305},{"name":"vtk_output","type":"process_array","link":304}],"outputs":[{"name":"project_parameters","type":"map","links":[312,313]}],"properties":{}},{"id":204,"type":"processes/list","pos":[670,81],"size":{"0":140,"1":46},"flags":{},"order":8,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[306]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":202,"type":"output_processes/GiDStructural","pos":[378,244],"size":{"0":210,"1":82},"flags":{},"order":5,"mode":0,"outputs":[{"name":"Process","type":"process","links":[291]}],"properties":{"python_module":"gid_output_process","kratos_module":"KratosMultiphysics","process_name":"GiDOutputProcess","help":"This process writes postprocessing files for GiD","Parameters":{"model_part_name":"Structure","output_name":"SWQ","postprocess_parameters":{"result_file_configuration":{"gidpost_flags":{"GiDPostMode":"GiD_PostBinary","WriteDeformedMeshFlag":"WriteDeformed","WriteConditionsFlag":"WriteConditions","MultiFileFlag":"SingleFile"},"file_label":"step","output_control_type":"step","output_interval":1,"body_output":true,"node_output":false,"skin_output":false,"plane_output":[],"nodal_results":["DISPLACEMENT","REACTION"],"gauss_point_results":["VON_MISES_STRESS"],"nodal_nonhistorical_results":[]},"point_data_configuration":[]}}}},{"id":19,"type":"processes/list","pos":[645,249],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":13,"mode":0,"inputs":[{"name":"In0","type":"process","link":291},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[305]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":203,"type":"output_processes/VTK_structural","pos":[375,378],"size":{"0":210,"1":58},"flags":{},"order":6,"mode":0,"outputs":[{"name":"Process","type":"process","links":[292]}],"properties":{"python_module":"vtk_output_process","kratos_module":"KratosMultiphysics","process_name":"VtkOutputProcess","help":"This process writes postprocessing files for Paraview","Parameters":{"model_part_name":"Structure","output_control_type":"step","output_interval":1,"file_format":"ascii","output_precision":7,"output_sub_model_parts":false,"folder_name":"vtk_output","save_output_files_in_folder":true,"nodal_solution_step_data_variables":["DISPLACEMENT","REACTION"],"nodal_data_value_variables":[],"element_data_value_variables":[],"condition_data_value_variables":[],"gauss_point_variables_extrapolated_to_nodes":["VON_MISES_STRESS"]}}},{"id":23,"type":"processes/list","pos":[644,359],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":14,"mode":0,"inputs":[{"name":"In0","type":"process","link":292},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[304]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":199,"type":"processes/interval","pos":[-668,285],"size":{"0":210,"1":82},"flags":{},"order":3,"mode":0,"outputs":[{"name":"","type":"process_array","links":[284]}],"properties":{}},{"id":149,"type":"model_part/ParsedModelPart","pos":[-931,-61],"size":{"0":278.79998779296875,"1":122},"flags":{},"order":4,"mode":0,"outputs":[{"name":".Parts_Solid_Solid_Auto1","type":"string","links":[289]},{"name":".DISPLACEMENT_Displacement_Auto1","type":"string","links":[282]},{"name":".LineLoad2D_Load_on_lines_Auto1","type":"string","links":[287]}],"properties":{"submodelpart_list":[".Parts_Solid_Solid_Auto1",".DISPLACEMENT_Displacement_Auto1",".LineLoad2D_Load_on_lines_Auto1"]},"widgets_values":["Structure",""]},{"id":32,"type":"basic/DownloadProblem","pos":[1431,-198],"size":{"0":210,"1":78},"flags":{"collapsed":false},"order":23,"mode":0,"inputs":[{"name":"data","type":0,"link":312},{"name":"download","type":-1,"link":null}],"properties":{"filename":"data.json"}},{"id":45,"type":"model_part/OutputView","pos":[1433,-74],"size":{"0":473.22265625,"1":3110},"flags":{"collapsed":false},"order":24,"mode":0,"inputs":[{"name":"json","type":0,"link":313}],"properties":{}},{"id":189,"type":"processes/Vector","pos":[-667,399],"size":{"0":210,"1":106},"flags":{},"order":9,"mode":0,"outputs":[{"name":"","type":"process_array","links":[285]}],"properties":{}},{"id":177,"type":"solver_settings_aux_nodes/MaterialImportSettings","pos":[123,-373],"size":{"0":287.20001220703125,"1":26},"flags":{},"order":20,"mode":0,"inputs":[{"name":"Materials filename","type":"string","link":250}],"outputs":[{"name":"solver_settings","type":"map","links":[315]}],"properties":{"materials_filename":""}},{"id":172,"type":"solver_settings_aux_nodes/ModelImportSettings","pos":[152,-505],"size":{"0":210,"1":82},"flags":{},"order":10,"mode":0,"outputs":[{"name":"solver_settings","type":"map","links":[314]}],"properties":{"input_filename":""}},{"id":207,"type":"solver_settings/StructuralMechanicsSolver","pos":[439,-460],"size":{"0":337.6000061035156,"1":78},"flags":{},"order":21,"mode":0,"inputs":[{"name":"model_import_settings","type":"map","link":314},{"name":"material_import_settings","type":"map","link":315}],"outputs":[{"name":"solver_settings","type":"map","links":[316]}],"properties":{"solver_type":"Static","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,"volumetric_strain_dofs":false}},{"id":14,"type":"materials/materials_list","pos":[-311,-376],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":16,"mode":0,"inputs":[{"name":"In0","type":"material","link":290},{"name":"In1","type":"material","link":null}],"outputs":[{"name":"array","type":"material_array","links":[249]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":176,"type":"materials/Material Writer","pos":[-135,-382],"size":{"0":210,"1":58},"flags":{},"order":19,"mode":0,"inputs":[{"name":"Material List","type":"material_array","link":249}],"outputs":[{"name":"Material","type":"string","links":[250]}],"properties":{}}],"links":[[249,14,0,176,0,"material_array"],[250,176,0,177,0,"string"],[279,197,0,198,1,"process_array"],[280,195,0,198,2,"process_array"],[281,186,0,198,3,"process_array"],[282,149,1,198,0,"string"],[284,199,0,200,1,"process_array"],[285,189,0,200,2,"process_array"],[286,200,0,168,0,"process"],[287,149,2,200,0,"string"],[288,198,0,175,0,"process"],[289,149,0,201,0,"string"],[290,201,0,14,0,"material"],[291,202,0,19,0,"process"],[292,203,0,23,0,"process"],[304,23,0,206,6,"process_array"],[305,19,0,206,5,"process_array"],[306,204,0,206,4,"process_array"],[307,168,0,206,3,"process_array"],[308,175,0,206,2,"process_array"],[310,4,0,206,0,"map"],[312,206,0,32,0,0],[313,206,0,45,0,0],[314,172,0,207,0,"map"],[315,177,0,207,1,"map"],[316,207,0,206,1,"map"]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file From a34de81140cd9de899c32a6ccbfaf4e6b48cb415 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Thu, 15 Jul 2021 11:16:12 +0200 Subject: [PATCH 27/45] Hyper reduced order model example --- .../output_processes/vtk_output_structural.js | 2 +- js/nodes/processes/load_process_list.js | 63 ------------------- .../processes/load_process_list_pressure.js | 54 ++++++++++++++++ .../model_import_settings.js | 2 +- resources/examples/StructuralMechanics.json | 2 +- 5 files changed, 57 insertions(+), 66 deletions(-) delete mode 100644 js/nodes/processes/load_process_list.js create mode 100644 js/nodes/processes/load_process_list_pressure.js diff --git a/js/nodes/output_processes/vtk_output_structural.js b/js/nodes/output_processes/vtk_output_structural.js index 78644a1..6aa965e 100644 --- a/js/nodes/output_processes/vtk_output_structural.js +++ b/js/nodes/output_processes/vtk_output_structural.js @@ -27,7 +27,7 @@ function VTKStructural() { } } this.addOutput("Process", "process"); - this.model_part_name = this.addWidget("text","ModelPartName", "Structure", function(v){}, {} ); + this.model_part_name = this.addWidget("text","ModelPartName", "Structure.VISUALIZE_HROM", function(v){}, {} ); this.size = this.computeSize(); } diff --git a/js/nodes/processes/load_process_list.js b/js/nodes/processes/load_process_list.js deleted file mode 100644 index 863b555..0000000 --- a/js/nodes/processes/load_process_list.js +++ /dev/null @@ -1,63 +0,0 @@ - -function LoadProcessList() { - this.addInput("model_part_name","string"); - this.addInput("interval","process_array"); - this.addInput("direction","process_array"); - - this.properties = { - "python_module" : "assign_vector_by_direction_to_condition_process", - "kratos_module" : "KratosMultiphysics", - "check" : "DirectorVectorNonZero direction", - "process_name" : "AssignVectorByDirectionToConditionProcess", - "Parameters" : { - "model_part_name" : "Structure.LineLoad2D_Load_on_lines_Auto1", - "variable_name" : "LINE_LOAD", - "interval" : [0.0,"End"], - "modulus" : 100000.0, - "direction" : [0.0,-1,0.0] - } - - }; - - var that = this; - this.variable_name = this.addWidget("text","VariableName", "LINE_LOAD", function(v){}, {} ); - this.modulus = this.addWidget("number","Modulus", 100000, function(v){}, {}); - - - this.addOutput("Process","process"); - - this.size = this.computeSize(); - this.serialize_widgets = true; - - } - - LoadProcessList.title = "Load process list"; - LoadProcessList.desc = "Node to specify a load process"; - - LoadProcessList.prototype.onExecute = function() { - myoutput = this.properties - // model_part_name - if (this.getInputData(0) != undefined) { - myoutput["Parameters"]["model_part_name"] = this.getInputData(0) - } else { - myoutput["Parameters"]["model_part_name"] = this.properties["Parameters"]["model_part_name"] - } - // interval - if (this.getInputData(1) != undefined) { - myoutput["Parameters"]["interval"] = this.getInputData(1) - } else { - myoutput["Parameters"]["interval"] = this.properties["Parameters"]["interval"] - } - // direction - if (this.getInputData(2) != undefined) { - myoutput["Parameters"]["direction"] = this.getInputData(2) - } else { - myoutput["Parameters"]["direction"] = this.properties["Parameters"]["direction"] - } - myoutput["Parameters"]["variable_name"] = this.variable_name.value - myoutput["Parameters"]["modulus"] = this.modulus.value - - this.setOutputData(0, myoutput); - }; - - LiteGraph.registerNodeType("processes/LoadProcessList", LoadProcessList); \ No newline at end of file diff --git a/js/nodes/processes/load_process_list_pressure.js b/js/nodes/processes/load_process_list_pressure.js new file mode 100644 index 0000000..31d7a6b --- /dev/null +++ b/js/nodes/processes/load_process_list_pressure.js @@ -0,0 +1,54 @@ + +function AssignScalarVariableToConditionsProcess() { + this.addInput("model_part_name","string"); + this.addInput("interval","process_array"); + + this.properties = { + "python_module" : "assign_scalar_variable_to_conditions_process", + "kratos_module" : "KratosMultiphysics", + "Parameters" : { + "model_part_name" : "Structure.COMPUTE_HROM.SurfacePressure3D_Pressure_on_surfaces_Auto4", + "variable_name" : "POSITIVE_FACE_PRESSURE", + "value" : "(-15000000*13) + t*15000000", + "interval" : [0.0,"End"] + } + + }; + + var that = this; + this.variable_name = this.addWidget("text","VariableName", "", function(v){}, {} ); + this.value = this.addWidget("text","Value", "", function(v){}, {}); + + + this.addOutput("Process","process"); + + this.size = this.computeSize(); + this.serialize_widgets = true; + + } + + AssignScalarVariableToConditionsProcess.title = "Load process list pressure"; + AssignScalarVariableToConditionsProcess.desc = "Node to specify a load process"; + + AssignScalarVariableToConditionsProcess.prototype.onExecute = function() { + myoutput = this.properties + // model_part_name + if (this.getInputData(0) != undefined) { + myoutput["Parameters"]["model_part_name"] = this.getInputData(0) + } else { + myoutput["Parameters"]["model_part_name"] = this.properties["Parameters"]["model_part_name"] + } + // interval + if (this.getInputData(1) != undefined) { + myoutput["Parameters"]["interval"] = this.getInputData(1) + } else { + myoutput["Parameters"]["interval"] = this.properties["Parameters"]["interval"] + } + + myoutput["Parameters"]["variable_name"] = this.variable_name.value + myoutput["Parameters"]["value"] = this.value.value + + this.setOutputData(0, myoutput); + }; + + LiteGraph.registerNodeType("processes/LoadProcessListPressure", AssignScalarVariableToConditionsProcess); \ No newline at end of file diff --git a/js/nodes/solver_settings_aux_nodes/model_import_settings.js b/js/nodes/solver_settings_aux_nodes/model_import_settings.js index b7dc084..47b6963 100644 --- a/js/nodes/solver_settings_aux_nodes/model_import_settings.js +++ b/js/nodes/solver_settings_aux_nodes/model_import_settings.js @@ -1,7 +1,7 @@ class ModelImportSettings { constructor() { - this.input_filename = this.addWidget("text", "Input filename", "SWQ", function (v) { }, {}); + this.input_filename = this.addWidget("text", "Input filename", "Hyper_Reduced_Model_Part", function (v) { }, {}); this.input_type = this.addWidget("combo", "Input type", "mdpa", function (v) { }, { values: ["mdpa", "rest"] }); this.properties = { diff --git a/resources/examples/StructuralMechanics.json b/resources/examples/StructuralMechanics.json index bf46623..926199a 100644 --- a/resources/examples/StructuralMechanics.json +++ b/resources/examples/StructuralMechanics.json @@ -1 +1 @@ -{"last_node_id":207,"last_link_id":316,"nodes":[{"id":175,"type":"processes/list","pos":[546,-100],"size":{"0":140,"1":46},"flags":{},"order":17,"mode":0,"inputs":[{"name":"In0","type":"process","link":288},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[308]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":201,"type":"materials/StructuralMaterial","pos":[-559,-428],"size":{"0":210,"1":198},"flags":{},"order":11,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":289},{"name":"tables","type":"process_array","link":null}],"outputs":[{"name":"Material","type":"material","links":[290]}],"properties":{"model_part_name":"Structure.Parts_Solid_Solid_Auto1","properties_id":1,"Material":{"constitutive_law":{"name":"LinearElasticPlaneStress2DLaw"},"Variables":{"DENSITY":7850,"YOUNG_MODULUS":206900000000,"POISSON_RATIO":0.29,"THICKNESS":0.1},"Tables":{}}}},{"id":197,"type":"processes/interval","pos":[-420,-188],"size":{"0":210,"1":82},"flags":{},"order":0,"mode":0,"outputs":[{"name":"","type":"process_array","links":[279]}],"properties":{}},{"id":198,"type":"processes/ConstraintsProcessList","pos":[-132,-190],"size":{"0":210,"1":118},"flags":{},"order":12,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":282},{"name":"interval","type":"process_array","link":279},{"name":"constrained","type":"process_array","link":280},{"name":"value","type":"process_array","link":281}],"outputs":[{"name":"Process","type":"process","links":[288]}],"properties":{"python_module":"assign_vector_variable_process","kratos_module":"KratosMultiphysics","process_name":"AssignVectorVariableProcess","Parameters":{"model_part_name":"Structure.DISPLACEMENT_Displacement_Auto1","variable_name":"DISPLACEMENT","interval":[0,"End"],"constrained":[true,true,true],"value":[0,0,0]}},"widgets_values":["DISPLACEMENT"]},{"id":195,"type":"processes/BooleanList","pos":[-427,-63],"size":{"0":210,"1":106},"flags":{},"order":1,"mode":0,"outputs":[{"name":"","type":"process_array","links":[280]}],"properties":{}},{"id":186,"type":"processes/Vector","pos":[-423,84],"size":{"0":210,"1":106},"flags":{},"order":2,"mode":0,"outputs":[{"name":"","type":"process_array","links":[281]}],"properties":{}},{"id":4,"type":"parameters/ProblemData","pos":[558,-298],"size":{"0":140,"1":86},"flags":{"collapsed":false},"order":7,"mode":0,"outputs":[{"name":"problem_data","type":"map","links":[310]},{"name":"problem_name","type":"string","links":null},{"name":"start_time","type":"number","links":null},{"name":"end_time","type":"number","links":null}],"properties":{"problem_name":"SWQ","parallel_type":"OpenMP","echo_level":1,"start_time":0,"end_time":10}},{"id":200,"type":"processes/LoadProcessList","pos":[-395,282],"size":{"0":210,"1":122},"flags":{},"order":15,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":287},{"name":"interval","type":"process_array","link":284},{"name":"direction","type":"process_array","link":285}],"outputs":[{"name":"Process","type":"process","links":[286]}],"properties":{"python_module":"assign_vector_by_direction_to_condition_process","kratos_module":"KratosMultiphysics","check":"DirectorVectorNonZero direction","process_name":"AssignVectorByDirectionToConditionProcess","Parameters":{"model_part_name":"Structure.LineLoad2D_Load_on_lines_Auto1","variable_name":"LINE_LOAD","interval":[0,"End"],"modulus":100000,"direction":[0,-1,0]}},"widgets_values":["LINE_LOAD",100000]},{"id":168,"type":"processes/list","pos":[-147,276],"size":{"0":140,"1":46},"flags":{},"order":18,"mode":0,"inputs":[{"name":"In0","type":"process","link":286},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[307]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":206,"type":"parameters/StructuralProjectParameters","pos":[1008,-130],"size":{"0":362.79998779296875,"1":146},"flags":{},"order":22,"mode":0,"inputs":[{"name":"problem_data","type":"map","link":310},{"name":"solver_settings","type":"map","link":316},{"name":"constraints_process_list","type":"process_array","link":308},{"name":"loads_process_list","type":"process_array","link":307},{"name":"list_other_processes","type":"process_array","link":306},{"name":"gid_output","type":"process_array","link":305},{"name":"vtk_output","type":"process_array","link":304}],"outputs":[{"name":"project_parameters","type":"map","links":[312,313]}],"properties":{}},{"id":204,"type":"processes/list","pos":[670,81],"size":{"0":140,"1":46},"flags":{},"order":8,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[306]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":202,"type":"output_processes/GiDStructural","pos":[378,244],"size":{"0":210,"1":82},"flags":{},"order":5,"mode":0,"outputs":[{"name":"Process","type":"process","links":[291]}],"properties":{"python_module":"gid_output_process","kratos_module":"KratosMultiphysics","process_name":"GiDOutputProcess","help":"This process writes postprocessing files for GiD","Parameters":{"model_part_name":"Structure","output_name":"SWQ","postprocess_parameters":{"result_file_configuration":{"gidpost_flags":{"GiDPostMode":"GiD_PostBinary","WriteDeformedMeshFlag":"WriteDeformed","WriteConditionsFlag":"WriteConditions","MultiFileFlag":"SingleFile"},"file_label":"step","output_control_type":"step","output_interval":1,"body_output":true,"node_output":false,"skin_output":false,"plane_output":[],"nodal_results":["DISPLACEMENT","REACTION"],"gauss_point_results":["VON_MISES_STRESS"],"nodal_nonhistorical_results":[]},"point_data_configuration":[]}}}},{"id":19,"type":"processes/list","pos":[645,249],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":13,"mode":0,"inputs":[{"name":"In0","type":"process","link":291},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[305]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":203,"type":"output_processes/VTK_structural","pos":[375,378],"size":{"0":210,"1":58},"flags":{},"order":6,"mode":0,"outputs":[{"name":"Process","type":"process","links":[292]}],"properties":{"python_module":"vtk_output_process","kratos_module":"KratosMultiphysics","process_name":"VtkOutputProcess","help":"This process writes postprocessing files for Paraview","Parameters":{"model_part_name":"Structure","output_control_type":"step","output_interval":1,"file_format":"ascii","output_precision":7,"output_sub_model_parts":false,"folder_name":"vtk_output","save_output_files_in_folder":true,"nodal_solution_step_data_variables":["DISPLACEMENT","REACTION"],"nodal_data_value_variables":[],"element_data_value_variables":[],"condition_data_value_variables":[],"gauss_point_variables_extrapolated_to_nodes":["VON_MISES_STRESS"]}}},{"id":23,"type":"processes/list","pos":[644,359],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":14,"mode":0,"inputs":[{"name":"In0","type":"process","link":292},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[304]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":199,"type":"processes/interval","pos":[-668,285],"size":{"0":210,"1":82},"flags":{},"order":3,"mode":0,"outputs":[{"name":"","type":"process_array","links":[284]}],"properties":{}},{"id":149,"type":"model_part/ParsedModelPart","pos":[-931,-61],"size":{"0":278.79998779296875,"1":122},"flags":{},"order":4,"mode":0,"outputs":[{"name":".Parts_Solid_Solid_Auto1","type":"string","links":[289]},{"name":".DISPLACEMENT_Displacement_Auto1","type":"string","links":[282]},{"name":".LineLoad2D_Load_on_lines_Auto1","type":"string","links":[287]}],"properties":{"submodelpart_list":[".Parts_Solid_Solid_Auto1",".DISPLACEMENT_Displacement_Auto1",".LineLoad2D_Load_on_lines_Auto1"]},"widgets_values":["Structure",""]},{"id":32,"type":"basic/DownloadProblem","pos":[1431,-198],"size":{"0":210,"1":78},"flags":{"collapsed":false},"order":23,"mode":0,"inputs":[{"name":"data","type":0,"link":312},{"name":"download","type":-1,"link":null}],"properties":{"filename":"data.json"}},{"id":45,"type":"model_part/OutputView","pos":[1433,-74],"size":{"0":473.22265625,"1":3110},"flags":{"collapsed":false},"order":24,"mode":0,"inputs":[{"name":"json","type":0,"link":313}],"properties":{}},{"id":189,"type":"processes/Vector","pos":[-667,399],"size":{"0":210,"1":106},"flags":{},"order":9,"mode":0,"outputs":[{"name":"","type":"process_array","links":[285]}],"properties":{}},{"id":177,"type":"solver_settings_aux_nodes/MaterialImportSettings","pos":[123,-373],"size":{"0":287.20001220703125,"1":26},"flags":{},"order":20,"mode":0,"inputs":[{"name":"Materials filename","type":"string","link":250}],"outputs":[{"name":"solver_settings","type":"map","links":[315]}],"properties":{"materials_filename":""}},{"id":172,"type":"solver_settings_aux_nodes/ModelImportSettings","pos":[152,-505],"size":{"0":210,"1":82},"flags":{},"order":10,"mode":0,"outputs":[{"name":"solver_settings","type":"map","links":[314]}],"properties":{"input_filename":""}},{"id":207,"type":"solver_settings/StructuralMechanicsSolver","pos":[439,-460],"size":{"0":337.6000061035156,"1":78},"flags":{},"order":21,"mode":0,"inputs":[{"name":"model_import_settings","type":"map","link":314},{"name":"material_import_settings","type":"map","link":315}],"outputs":[{"name":"solver_settings","type":"map","links":[316]}],"properties":{"solver_type":"Static","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,"volumetric_strain_dofs":false}},{"id":14,"type":"materials/materials_list","pos":[-311,-376],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":16,"mode":0,"inputs":[{"name":"In0","type":"material","link":290},{"name":"In1","type":"material","link":null}],"outputs":[{"name":"array","type":"material_array","links":[249]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":176,"type":"materials/Material Writer","pos":[-135,-382],"size":{"0":210,"1":58},"flags":{},"order":19,"mode":0,"inputs":[{"name":"Material List","type":"material_array","link":249}],"outputs":[{"name":"Material","type":"string","links":[250]}],"properties":{}}],"links":[[249,14,0,176,0,"material_array"],[250,176,0,177,0,"string"],[279,197,0,198,1,"process_array"],[280,195,0,198,2,"process_array"],[281,186,0,198,3,"process_array"],[282,149,1,198,0,"string"],[284,199,0,200,1,"process_array"],[285,189,0,200,2,"process_array"],[286,200,0,168,0,"process"],[287,149,2,200,0,"string"],[288,198,0,175,0,"process"],[289,149,0,201,0,"string"],[290,201,0,14,0,"material"],[291,202,0,19,0,"process"],[292,203,0,23,0,"process"],[304,23,0,206,6,"process_array"],[305,19,0,206,5,"process_array"],[306,204,0,206,4,"process_array"],[307,168,0,206,3,"process_array"],[308,175,0,206,2,"process_array"],[310,4,0,206,0,"map"],[312,206,0,32,0,0],[313,206,0,45,0,0],[314,172,0,207,0,"map"],[315,177,0,207,1,"map"],[316,207,0,206,1,"map"]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file +{"last_node_id":217,"last_link_id":338,"nodes":[{"id":175,"type":"processes/list","pos":[546,-100],"size":{"0":140,"1":46},"flags":{},"order":17,"mode":0,"inputs":[{"name":"In0","type":"process","link":288},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[308]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":206,"type":"parameters/StructuralProjectParameters","pos":[1008,-130],"size":{"0":362.79998779296875,"1":146},"flags":{},"order":22,"mode":0,"inputs":[{"name":"problem_data","type":"map","link":310},{"name":"solver_settings","type":"map","link":316},{"name":"constraints_process_list","type":"process_array","link":308},{"name":"loads_process_list","type":"process_array","link":327},{"name":"list_other_processes","type":"process_array","link":306},{"name":"gid_output","type":"process_array","link":305},{"name":"vtk_output","type":"process_array","link":304}],"outputs":[{"name":"project_parameters","type":"map","links":[312,313]}],"properties":{}},{"id":177,"type":"solver_settings_aux_nodes/MaterialImportSettings","pos":[123,-373],"size":{"0":287.20001220703125,"1":26},"flags":{},"order":20,"mode":0,"inputs":[{"name":"Materials filename","type":"string","link":250}],"outputs":[{"name":"solver_settings","type":"map","links":[315]}],"properties":{"materials_filename":""}},{"id":14,"type":"materials/materials_list","pos":[-323,-428],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":16,"mode":0,"inputs":[{"name":"In0","type":"material","link":321},{"name":"In1","type":"material","link":null}],"outputs":[{"name":"array","type":"material_array","links":[249]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":176,"type":"materials/Material Writer","pos":[-147,-423],"size":{"0":210,"1":58},"flags":{},"order":19,"mode":0,"inputs":[{"name":"Material List","type":"material_array","link":249}],"outputs":[{"name":"Material","type":"string","links":[250]}],"properties":{}},{"id":19,"type":"processes/list","pos":[631,213],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":0,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[305]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":204,"type":"processes/list","pos":[670,81],"size":{"0":140,"1":46},"flags":{},"order":1,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[306]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":212,"type":"processes/list","pos":[548,-2],"size":{"0":140,"1":66},"flags":{},"order":18,"mode":0,"inputs":[{"name":"In0","type":"process","link":337},{"name":"In1","type":"process","link":338},{"name":"In2","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[327]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":186,"type":"processes/Vector","pos":[-421,164],"size":{"0":210,"1":106},"flags":{},"order":2,"mode":0,"outputs":[{"name":"","type":"process_array","links":[281]}],"properties":{}},{"id":195,"type":"processes/BooleanList","pos":[-419,17],"size":{"0":210,"1":106},"flags":{},"order":3,"mode":0,"outputs":[{"name":"","type":"process_array","links":[280]}],"properties":{}},{"id":208,"type":"materials/StructuralMaterial","pos":[-563,-431],"size":{"0":210,"1":174},"flags":{},"order":11,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":331},{"name":"tables","type":"process_array","link":null}],"outputs":[{"name":"Material","type":"material","links":[321]}],"properties":{"model_part_name":"Structure.Parts_Solid_Solid_Auto1","properties_id":1,"Material":{"constitutive_law":{"name":"LinearElastic3DLaw"},"Variables":{"DENSITY":7850,"YOUNG_MODULUS":206900000000,"POISSON_RATIO":0.29},"Tables":{}}}},{"id":23,"type":"processes/list","pos":[611,309],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":15,"mode":0,"inputs":[{"name":"In0","type":"process","link":292},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[304]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":4,"type":"parameters/ProblemData","pos":[558,-298],"size":{"0":140,"1":86},"flags":{"collapsed":false},"order":4,"mode":0,"outputs":[{"name":"problem_data","type":"map","links":[310]},{"name":"problem_name","type":"string","links":null},{"name":"start_time","type":"number","links":null},{"name":"end_time","type":"number","links":null}],"properties":{"problem_name":"Wing4","parallel_type":"OpenMP","echo_level":1,"start_time":0,"end_time":30}},{"id":197,"type":"processes/interval","pos":[-418,-114],"size":{"0":210,"1":82},"flags":{},"order":5,"mode":0,"outputs":[{"name":"","type":"process_array","links":[279]}],"properties":{}},{"id":214,"type":"processes/interval","pos":[-38,-2],"size":{"0":210,"1":82},"flags":{},"order":6,"mode":0,"outputs":[{"name":"","type":"process_array","links":[335]}],"properties":{}},{"id":217,"type":"processes/interval","pos":[-34,182],"size":{"0":210,"1":82},"flags":{},"order":7,"mode":0,"outputs":[{"name":"","type":"process_array","links":[336]}],"properties":{}},{"id":198,"type":"processes/ConstraintsProcessList","pos":[-108,-204],"size":{"0":325.6131286621094,"1":131.84764099121094},"flags":{},"order":12,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":332},{"name":"interval","type":"process_array","link":279},{"name":"constrained","type":"process_array","link":280},{"name":"value","type":"process_array","link":281}],"outputs":[{"name":"Process","type":"process","links":[288]}],"properties":{"python_module":"assign_vector_variable_process","kratos_module":"KratosMultiphysics","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.DISPLACEMENT_Displacement_Auto1","variable_name":"DISPLACEMENT","interval":[0,"End"],"constrained":[true,true,true],"value":[0,0,0]},"process_name":"AssignVectorVariableProcess"},"widgets_values":["DISPLACEMENT"]},{"id":149,"type":"model_part/ParsedModelPart","pos":[-1041,-242],"size":{"0":388,"1":142},"flags":{},"order":8,"mode":0,"outputs":[{"name":".Parts_Solid_Solid_Auto1","type":"string","links":[331]},{"name":".DISPLACEMENT_Displacement_Auto1","type":"string","links":[332]},{"name":".SurfacePressure3D_Pressure_on_surfaces_Auto2","type":"string","links":[333]},{"name":".SurfacePressure3D_Pressure_on_surfaces_Auto3","type":"string","links":[334]}],"properties":{"submodelpart_list":[".Parts_Solid_Solid_Auto1",".DISPLACEMENT_Displacement_Auto1",".SurfacePressure3D_Pressure_on_surfaces_Auto2",".SurfacePressure3D_Pressure_on_surfaces_Auto3"]},"widgets_values":["Structure.COMPUTE_HROM",""]},{"id":215,"type":"processes/LoadProcessListPressure","pos":[253,-23],"size":{"0":210,"1":102},"flags":{},"order":13,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":333},{"name":"interval","type":"process_array","link":335}],"outputs":[{"name":"Process","type":"process","links":[337]}],"properties":{"python_module":"assign_scalar_variable_to_conditions_process","kratos_module":"KratosMultiphysics","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.SurfacePressure3D_Pressure_on_surfaces_Auto2","variable_name":"POSITIVE_FACE_PRESSURE","value":"0","interval":[0,"End"]}},"widgets_values":["POSITIVE_FACE_PRESSURE","0"]},{"id":216,"type":"processes/LoadProcessListPressure","pos":[261,137],"size":{"0":210,"1":102},"flags":{},"order":14,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":334},{"name":"interval","type":"process_array","link":336}],"outputs":[{"name":"Process","type":"process","links":[338]}],"properties":{"python_module":"assign_scalar_variable_to_conditions_process","kratos_module":"KratosMultiphysics","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.SurfacePressure3D_Pressure_on_surfaces_Auto3","variable_name":"POSITIVE_FACE_PRESSURE","value":"(-1500*15)+1500*t","interval":[0,"End"]}},"widgets_values":["POSITIVE_FACE_PRESSURE","(-1500*15)+1500*t"]},{"id":203,"type":"output_processes/VTK_structural","pos":[372,292],"size":{"0":210,"1":58},"flags":{"collapsed":false},"order":9,"mode":0,"outputs":[{"name":"Process","type":"process","links":[292]}],"properties":{"python_module":"vtk_output_process","kratos_module":"KratosMultiphysics","process_name":"VtkOutputProcess","help":"This process writes postprocessing files for Paraview","Parameters":{"model_part_name":"Structure.VISUALIZE_HROM","output_control_type":"step","output_interval":1,"file_format":"ascii","output_precision":7,"output_sub_model_parts":false,"folder_name":"vtk_output","save_output_files_in_folder":true,"nodal_solution_step_data_variables":["DISPLACEMENT","REACTION"],"nodal_data_value_variables":[],"element_data_value_variables":[],"condition_data_value_variables":[],"gauss_point_variables_extrapolated_to_nodes":["VON_MISES_STRESS"]}}},{"id":207,"type":"solver_settings/StructuralMechanicsSolver","pos":[439,-460],"size":{"0":337.6000061035156,"1":78},"flags":{},"order":21,"mode":0,"inputs":[{"name":"model_import_settings","type":"map","link":314},{"name":"material_import_settings","type":"map","link":315}],"outputs":[{"name":"solver_settings","type":"map","links":[316]}],"properties":{"solver_type":"Static","model_part_name":"Structure","domain_size":3,"echo_level":0,"analysis_type":"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,"volumetric_strain_dofs":false,"problem_domain_sub_model_part_list":["COMPUTE_HROM, VISUALIZE_HROM"],"processes_sub_model_part_list":["COMPUTE_HROM, VISUALIZE_HROM"]}},{"id":45,"type":"model_part/OutputView","pos":[1436,-24],"size":{"0":638.62109375,"1":2610},"flags":{"collapsed":false},"order":24,"mode":0,"inputs":[{"name":"json","type":0,"link":313}],"properties":{}},{"id":172,"type":"solver_settings_aux_nodes/ModelImportSettings","pos":[152,-505],"size":{"0":210,"1":82},"flags":{},"order":10,"mode":0,"outputs":[{"name":"solver_settings","type":"map","links":[314]}],"properties":{"input_filename":""}},{"id":32,"type":"basic/DownloadProblem","pos":[1431,-198],"size":{"0":210,"1":78},"flags":{"collapsed":false},"order":23,"mode":0,"inputs":[{"name":"data","type":0,"link":312},{"name":"download","type":-1,"link":null}],"properties":{"filename":"data.json"}}],"links":[[249,14,0,176,0,"material_array"],[250,176,0,177,0,"string"],[279,197,0,198,1,"process_array"],[280,195,0,198,2,"process_array"],[281,186,0,198,3,"process_array"],[288,198,0,175,0,"process"],[292,203,0,23,0,"process"],[304,23,0,206,6,"process_array"],[305,19,0,206,5,"process_array"],[306,204,0,206,4,"process_array"],[308,175,0,206,2,"process_array"],[310,4,0,206,0,"map"],[312,206,0,32,0,0],[313,206,0,45,0,0],[314,172,0,207,0,"map"],[315,177,0,207,1,"map"],[316,207,0,206,1,"map"],[321,208,0,14,0,"material"],[327,212,0,206,3,"process_array"],[331,149,0,208,0,"string"],[332,149,1,198,0,"string"],[333,149,2,215,0,"string"],[334,149,3,216,0,"string"],[335,214,0,215,1,"process_array"],[336,217,0,216,1,"process_array"],[337,215,0,212,0,"process"],[338,216,0,212,1,"process"]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file From 1b841565f93d31cffc153a584f97f77590ddc719 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Thu, 15 Jul 2021 11:26:48 +0200 Subject: [PATCH 28/45] New node to assign scalar variable to conditions process --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index d0de935..c943c59 100644 --- a/index.html +++ b/index.html @@ -81,7 +81,7 @@ - + From 37c9f18838fc6740846b6cbbc7476d614b3ebca3 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Sun, 25 Jul 2021 18:37:38 +0200 Subject: [PATCH 29/45] Download file with correct extension --- js/nodes/materials/material_writer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/nodes/materials/material_writer.js b/js/nodes/materials/material_writer.js index 915571d..45e58a2 100644 --- a/js/nodes/materials/material_writer.js +++ b/js/nodes/materials/material_writer.js @@ -1,7 +1,7 @@ class MaterialWriter { constructor() { - this.material_file_name = this.addWidget("string","Materials Filenae", "Materials"); + this.material_file_name = this.addWidget("string","Materials Filenae", "Materials.json"); this.addInput("Material List","material_array"); this.addOutput("Material","string"); this.size = this.computeSize(); From bff65993ea5f38b100b255ef1c1a0a4236a15e1a Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Mon, 26 Jul 2021 23:15:04 +0200 Subject: [PATCH 30/45] Change of module name and node name --- js/nodes/processes/constraints_process_list.js | 18 +++++++++--------- .../processes/load_process_list_pressure.js | 14 +++++++------- resources/examples/StructuralMechanics.json | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/js/nodes/processes/constraints_process_list.js b/js/nodes/processes/constraints_process_list.js index 0b4ff37..50c464e 100644 --- a/js/nodes/processes/constraints_process_list.js +++ b/js/nodes/processes/constraints_process_list.js @@ -6,15 +6,15 @@ function AssignVectorVariableProcess () { this.properties = { - "python_module" : "assign_vector_variable_process", - "kratos_module" : "KratosMultiphysics", - "process_name" : "AssignVectorVariableProcess", + "python_module" : "", + "kratos_module" : "", + "process_name" : "", "Parameters" : { - "model_part_name" : "Structure.DISPLACEMENT_Displacement_Auto1", - "variable_name" : "DISPLACEMENT", - "interval" : [0.0,"End"], - "constrained" : [true,true,true], - "value" : [0.0,0.0,0.0] + "model_part_name" : "", + "variable_name" : "", + "interval" : [], + "constrained" : [], + "value" : [] } }; var that = this; @@ -67,6 +67,6 @@ myoutput["Parameters"]["variable_name"] = this.variable_name.value this.setOutputData(0, myoutput); }; -LiteGraph.registerNodeType("processes/ConstraintsProcessList", AssignVectorVariableProcess ); +LiteGraph.registerNodeType("processes/AssignVectorVariableProcess", AssignVectorVariableProcess ); console.log("ConstraintsProcessList node created"); //helps to debug \ No newline at end of file diff --git a/js/nodes/processes/load_process_list_pressure.js b/js/nodes/processes/load_process_list_pressure.js index 31d7a6b..f694db8 100644 --- a/js/nodes/processes/load_process_list_pressure.js +++ b/js/nodes/processes/load_process_list_pressure.js @@ -4,13 +4,13 @@ function AssignScalarVariableToConditionsProcess() { this.addInput("interval","process_array"); this.properties = { - "python_module" : "assign_scalar_variable_to_conditions_process", - "kratos_module" : "KratosMultiphysics", + "python_module" : "", + "kratos_module" : "", "Parameters" : { - "model_part_name" : "Structure.COMPUTE_HROM.SurfacePressure3D_Pressure_on_surfaces_Auto4", - "variable_name" : "POSITIVE_FACE_PRESSURE", - "value" : "(-15000000*13) + t*15000000", - "interval" : [0.0,"End"] + "model_part_name" : "", + "variable_name" : "", + "value" : "", + "interval" : [] } }; @@ -51,4 +51,4 @@ function AssignScalarVariableToConditionsProcess() { this.setOutputData(0, myoutput); }; - LiteGraph.registerNodeType("processes/LoadProcessListPressure", AssignScalarVariableToConditionsProcess); \ No newline at end of file + LiteGraph.registerNodeType("processes/AssignScalarVariableToConditionsProcess", AssignScalarVariableToConditionsProcess); \ No newline at end of file diff --git a/resources/examples/StructuralMechanics.json b/resources/examples/StructuralMechanics.json index 926199a..88003f2 100644 --- a/resources/examples/StructuralMechanics.json +++ b/resources/examples/StructuralMechanics.json @@ -1 +1 @@ -{"last_node_id":217,"last_link_id":338,"nodes":[{"id":175,"type":"processes/list","pos":[546,-100],"size":{"0":140,"1":46},"flags":{},"order":17,"mode":0,"inputs":[{"name":"In0","type":"process","link":288},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[308]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":206,"type":"parameters/StructuralProjectParameters","pos":[1008,-130],"size":{"0":362.79998779296875,"1":146},"flags":{},"order":22,"mode":0,"inputs":[{"name":"problem_data","type":"map","link":310},{"name":"solver_settings","type":"map","link":316},{"name":"constraints_process_list","type":"process_array","link":308},{"name":"loads_process_list","type":"process_array","link":327},{"name":"list_other_processes","type":"process_array","link":306},{"name":"gid_output","type":"process_array","link":305},{"name":"vtk_output","type":"process_array","link":304}],"outputs":[{"name":"project_parameters","type":"map","links":[312,313]}],"properties":{}},{"id":177,"type":"solver_settings_aux_nodes/MaterialImportSettings","pos":[123,-373],"size":{"0":287.20001220703125,"1":26},"flags":{},"order":20,"mode":0,"inputs":[{"name":"Materials filename","type":"string","link":250}],"outputs":[{"name":"solver_settings","type":"map","links":[315]}],"properties":{"materials_filename":""}},{"id":14,"type":"materials/materials_list","pos":[-323,-428],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":16,"mode":0,"inputs":[{"name":"In0","type":"material","link":321},{"name":"In1","type":"material","link":null}],"outputs":[{"name":"array","type":"material_array","links":[249]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":176,"type":"materials/Material Writer","pos":[-147,-423],"size":{"0":210,"1":58},"flags":{},"order":19,"mode":0,"inputs":[{"name":"Material List","type":"material_array","link":249}],"outputs":[{"name":"Material","type":"string","links":[250]}],"properties":{}},{"id":19,"type":"processes/list","pos":[631,213],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":0,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[305]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":204,"type":"processes/list","pos":[670,81],"size":{"0":140,"1":46},"flags":{},"order":1,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[306]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":212,"type":"processes/list","pos":[548,-2],"size":{"0":140,"1":66},"flags":{},"order":18,"mode":0,"inputs":[{"name":"In0","type":"process","link":337},{"name":"In1","type":"process","link":338},{"name":"In2","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[327]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":186,"type":"processes/Vector","pos":[-421,164],"size":{"0":210,"1":106},"flags":{},"order":2,"mode":0,"outputs":[{"name":"","type":"process_array","links":[281]}],"properties":{}},{"id":195,"type":"processes/BooleanList","pos":[-419,17],"size":{"0":210,"1":106},"flags":{},"order":3,"mode":0,"outputs":[{"name":"","type":"process_array","links":[280]}],"properties":{}},{"id":208,"type":"materials/StructuralMaterial","pos":[-563,-431],"size":{"0":210,"1":174},"flags":{},"order":11,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":331},{"name":"tables","type":"process_array","link":null}],"outputs":[{"name":"Material","type":"material","links":[321]}],"properties":{"model_part_name":"Structure.Parts_Solid_Solid_Auto1","properties_id":1,"Material":{"constitutive_law":{"name":"LinearElastic3DLaw"},"Variables":{"DENSITY":7850,"YOUNG_MODULUS":206900000000,"POISSON_RATIO":0.29},"Tables":{}}}},{"id":23,"type":"processes/list","pos":[611,309],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":15,"mode":0,"inputs":[{"name":"In0","type":"process","link":292},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[304]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":4,"type":"parameters/ProblemData","pos":[558,-298],"size":{"0":140,"1":86},"flags":{"collapsed":false},"order":4,"mode":0,"outputs":[{"name":"problem_data","type":"map","links":[310]},{"name":"problem_name","type":"string","links":null},{"name":"start_time","type":"number","links":null},{"name":"end_time","type":"number","links":null}],"properties":{"problem_name":"Wing4","parallel_type":"OpenMP","echo_level":1,"start_time":0,"end_time":30}},{"id":197,"type":"processes/interval","pos":[-418,-114],"size":{"0":210,"1":82},"flags":{},"order":5,"mode":0,"outputs":[{"name":"","type":"process_array","links":[279]}],"properties":{}},{"id":214,"type":"processes/interval","pos":[-38,-2],"size":{"0":210,"1":82},"flags":{},"order":6,"mode":0,"outputs":[{"name":"","type":"process_array","links":[335]}],"properties":{}},{"id":217,"type":"processes/interval","pos":[-34,182],"size":{"0":210,"1":82},"flags":{},"order":7,"mode":0,"outputs":[{"name":"","type":"process_array","links":[336]}],"properties":{}},{"id":198,"type":"processes/ConstraintsProcessList","pos":[-108,-204],"size":{"0":325.6131286621094,"1":131.84764099121094},"flags":{},"order":12,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":332},{"name":"interval","type":"process_array","link":279},{"name":"constrained","type":"process_array","link":280},{"name":"value","type":"process_array","link":281}],"outputs":[{"name":"Process","type":"process","links":[288]}],"properties":{"python_module":"assign_vector_variable_process","kratos_module":"KratosMultiphysics","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.DISPLACEMENT_Displacement_Auto1","variable_name":"DISPLACEMENT","interval":[0,"End"],"constrained":[true,true,true],"value":[0,0,0]},"process_name":"AssignVectorVariableProcess"},"widgets_values":["DISPLACEMENT"]},{"id":149,"type":"model_part/ParsedModelPart","pos":[-1041,-242],"size":{"0":388,"1":142},"flags":{},"order":8,"mode":0,"outputs":[{"name":".Parts_Solid_Solid_Auto1","type":"string","links":[331]},{"name":".DISPLACEMENT_Displacement_Auto1","type":"string","links":[332]},{"name":".SurfacePressure3D_Pressure_on_surfaces_Auto2","type":"string","links":[333]},{"name":".SurfacePressure3D_Pressure_on_surfaces_Auto3","type":"string","links":[334]}],"properties":{"submodelpart_list":[".Parts_Solid_Solid_Auto1",".DISPLACEMENT_Displacement_Auto1",".SurfacePressure3D_Pressure_on_surfaces_Auto2",".SurfacePressure3D_Pressure_on_surfaces_Auto3"]},"widgets_values":["Structure.COMPUTE_HROM",""]},{"id":215,"type":"processes/LoadProcessListPressure","pos":[253,-23],"size":{"0":210,"1":102},"flags":{},"order":13,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":333},{"name":"interval","type":"process_array","link":335}],"outputs":[{"name":"Process","type":"process","links":[337]}],"properties":{"python_module":"assign_scalar_variable_to_conditions_process","kratos_module":"KratosMultiphysics","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.SurfacePressure3D_Pressure_on_surfaces_Auto2","variable_name":"POSITIVE_FACE_PRESSURE","value":"0","interval":[0,"End"]}},"widgets_values":["POSITIVE_FACE_PRESSURE","0"]},{"id":216,"type":"processes/LoadProcessListPressure","pos":[261,137],"size":{"0":210,"1":102},"flags":{},"order":14,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":334},{"name":"interval","type":"process_array","link":336}],"outputs":[{"name":"Process","type":"process","links":[338]}],"properties":{"python_module":"assign_scalar_variable_to_conditions_process","kratos_module":"KratosMultiphysics","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.SurfacePressure3D_Pressure_on_surfaces_Auto3","variable_name":"POSITIVE_FACE_PRESSURE","value":"(-1500*15)+1500*t","interval":[0,"End"]}},"widgets_values":["POSITIVE_FACE_PRESSURE","(-1500*15)+1500*t"]},{"id":203,"type":"output_processes/VTK_structural","pos":[372,292],"size":{"0":210,"1":58},"flags":{"collapsed":false},"order":9,"mode":0,"outputs":[{"name":"Process","type":"process","links":[292]}],"properties":{"python_module":"vtk_output_process","kratos_module":"KratosMultiphysics","process_name":"VtkOutputProcess","help":"This process writes postprocessing files for Paraview","Parameters":{"model_part_name":"Structure.VISUALIZE_HROM","output_control_type":"step","output_interval":1,"file_format":"ascii","output_precision":7,"output_sub_model_parts":false,"folder_name":"vtk_output","save_output_files_in_folder":true,"nodal_solution_step_data_variables":["DISPLACEMENT","REACTION"],"nodal_data_value_variables":[],"element_data_value_variables":[],"condition_data_value_variables":[],"gauss_point_variables_extrapolated_to_nodes":["VON_MISES_STRESS"]}}},{"id":207,"type":"solver_settings/StructuralMechanicsSolver","pos":[439,-460],"size":{"0":337.6000061035156,"1":78},"flags":{},"order":21,"mode":0,"inputs":[{"name":"model_import_settings","type":"map","link":314},{"name":"material_import_settings","type":"map","link":315}],"outputs":[{"name":"solver_settings","type":"map","links":[316]}],"properties":{"solver_type":"Static","model_part_name":"Structure","domain_size":3,"echo_level":0,"analysis_type":"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,"volumetric_strain_dofs":false,"problem_domain_sub_model_part_list":["COMPUTE_HROM, VISUALIZE_HROM"],"processes_sub_model_part_list":["COMPUTE_HROM, VISUALIZE_HROM"]}},{"id":45,"type":"model_part/OutputView","pos":[1436,-24],"size":{"0":638.62109375,"1":2610},"flags":{"collapsed":false},"order":24,"mode":0,"inputs":[{"name":"json","type":0,"link":313}],"properties":{}},{"id":172,"type":"solver_settings_aux_nodes/ModelImportSettings","pos":[152,-505],"size":{"0":210,"1":82},"flags":{},"order":10,"mode":0,"outputs":[{"name":"solver_settings","type":"map","links":[314]}],"properties":{"input_filename":""}},{"id":32,"type":"basic/DownloadProblem","pos":[1431,-198],"size":{"0":210,"1":78},"flags":{"collapsed":false},"order":23,"mode":0,"inputs":[{"name":"data","type":0,"link":312},{"name":"download","type":-1,"link":null}],"properties":{"filename":"data.json"}}],"links":[[249,14,0,176,0,"material_array"],[250,176,0,177,0,"string"],[279,197,0,198,1,"process_array"],[280,195,0,198,2,"process_array"],[281,186,0,198,3,"process_array"],[288,198,0,175,0,"process"],[292,203,0,23,0,"process"],[304,23,0,206,6,"process_array"],[305,19,0,206,5,"process_array"],[306,204,0,206,4,"process_array"],[308,175,0,206,2,"process_array"],[310,4,0,206,0,"map"],[312,206,0,32,0,0],[313,206,0,45,0,0],[314,172,0,207,0,"map"],[315,177,0,207,1,"map"],[316,207,0,206,1,"map"],[321,208,0,14,0,"material"],[327,212,0,206,3,"process_array"],[331,149,0,208,0,"string"],[332,149,1,198,0,"string"],[333,149,2,215,0,"string"],[334,149,3,216,0,"string"],[335,214,0,215,1,"process_array"],[336,217,0,216,1,"process_array"],[337,215,0,212,0,"process"],[338,216,0,212,1,"process"]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file +{"last_node_id":220,"last_link_id":349,"nodes":[{"id":206,"type":"parameters/StructuralProjectParameters","pos":[1008,-130],"size":{"0":362.79998779296875,"1":146},"flags":{},"order":22,"mode":0,"inputs":[{"name":"problem_data","type":"map","link":310},{"name":"solver_settings","type":"map","link":316},{"name":"constraints_process_list","type":"process_array","link":308},{"name":"loads_process_list","type":"process_array","link":327},{"name":"list_other_processes","type":"process_array","link":306},{"name":"gid_output","type":"process_array","link":305},{"name":"vtk_output","type":"process_array","link":304}],"outputs":[{"name":"project_parameters","type":"map","links":[312,313]}],"properties":{}},{"id":177,"type":"solver_settings_aux_nodes/MaterialImportSettings","pos":[123,-373],"size":{"0":287.20001220703125,"1":26},"flags":{},"order":20,"mode":0,"inputs":[{"name":"Materials filename","type":"string","link":250}],"outputs":[{"name":"solver_settings","type":"map","links":[315]}],"properties":{"materials_filename":""}},{"id":14,"type":"materials/materials_list","pos":[-323,-428],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":16,"mode":0,"inputs":[{"name":"In0","type":"material","link":321},{"name":"In1","type":"material","link":null}],"outputs":[{"name":"array","type":"material_array","links":[249]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":176,"type":"materials/Material Writer","pos":[-147,-423],"size":{"0":210,"1":58},"flags":{},"order":19,"mode":0,"inputs":[{"name":"Material List","type":"material_array","link":249}],"outputs":[{"name":"Material","type":"string","links":[250]}],"properties":{}},{"id":19,"type":"processes/list","pos":[631,213],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":0,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[305]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":204,"type":"processes/list","pos":[670,81],"size":{"0":140,"1":46},"flags":{},"order":1,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[306]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":208,"type":"materials/StructuralMaterial","pos":[-563,-431],"size":{"0":210,"1":174},"flags":{},"order":12,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":331},{"name":"tables","type":"process_array","link":null}],"outputs":[{"name":"Material","type":"material","links":[321]}],"properties":{"model_part_name":"Structure.Parts_Solid_Solid_Auto1","properties_id":1,"Material":{"constitutive_law":{"name":"LinearElasticPlaneStress2DLaw"},"Variables":{"DENSITY":7850,"YOUNG_MODULUS":206900000000,"POISSON_RATIO":0.29,"THICKNESS":0.1},"Tables":{}}}},{"id":23,"type":"processes/list","pos":[611,309],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":11,"mode":0,"inputs":[{"name":"In0","type":"process","link":292},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[304]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":4,"type":"parameters/ProblemData","pos":[558,-298],"size":{"0":140,"1":86},"flags":{"collapsed":false},"order":2,"mode":0,"outputs":[{"name":"problem_data","type":"map","links":[310]},{"name":"problem_name","type":"string","links":null},{"name":"start_time","type":"number","links":null},{"name":"end_time","type":"number","links":null}],"properties":{"problem_name":"Wing4","parallel_type":"OpenMP","echo_level":1,"start_time":0,"end_time":30}},{"id":203,"type":"output_processes/VTK_structural","pos":[372,292],"size":{"0":210,"1":58},"flags":{"collapsed":false},"order":3,"mode":0,"outputs":[{"name":"Process","type":"process","links":[292]}],"properties":{"python_module":"vtk_output_process","kratos_module":"KratosMultiphysics","process_name":"VtkOutputProcess","help":"This process writes postprocessing files for Paraview","Parameters":{"model_part_name":"Structure.VISUALIZE_HROM","output_control_type":"step","output_interval":1,"file_format":"ascii","output_precision":7,"output_sub_model_parts":false,"folder_name":"vtk_output","save_output_files_in_folder":true,"nodal_solution_step_data_variables":["DISPLACEMENT","REACTION"],"nodal_data_value_variables":[],"element_data_value_variables":[],"condition_data_value_variables":[],"gauss_point_variables_extrapolated_to_nodes":["VON_MISES_STRESS"]}}},{"id":207,"type":"solver_settings/StructuralMechanicsSolver","pos":[439,-460],"size":{"0":337.6000061035156,"1":78},"flags":{},"order":21,"mode":0,"inputs":[{"name":"model_import_settings","type":"map","link":314},{"name":"material_import_settings","type":"map","link":315}],"outputs":[{"name":"solver_settings","type":"map","links":[316]}],"properties":{"solver_type":"Static","model_part_name":"Structure","domain_size":3,"echo_level":0,"analysis_type":"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,"volumetric_strain_dofs":false,"problem_domain_sub_model_part_list":["COMPUTE_HROM, VISUALIZE_HROM"],"processes_sub_model_part_list":["COMPUTE_HROM, VISUALIZE_HROM"]}},{"id":172,"type":"solver_settings_aux_nodes/ModelImportSettings","pos":[152,-505],"size":{"0":210,"1":82},"flags":{},"order":4,"mode":0,"outputs":[{"name":"solver_settings","type":"map","links":[314]}],"properties":{"input_filename":""}},{"id":32,"type":"basic/DownloadProblem","pos":[1431,-198],"size":{"0":210,"1":78},"flags":{"collapsed":false},"order":23,"mode":0,"inputs":[{"name":"data","type":0,"link":312},{"name":"download","type":-1,"link":null}],"properties":{"filename":"data.json"}},{"id":197,"type":"processes/interval","pos":[-418,-114],"size":{"0":210,"1":82},"flags":{},"order":5,"mode":0,"outputs":[{"name":"","type":"process_array","links":[340]}],"properties":{}},{"id":195,"type":"processes/BooleanList","pos":[-419,17],"size":{"0":210,"1":106},"flags":{},"order":6,"mode":0,"outputs":[{"name":"","type":"process_array","links":[341]}],"properties":{}},{"id":186,"type":"processes/Vector","pos":[-421,164],"size":{"0":210,"1":106},"flags":{},"order":7,"mode":0,"outputs":[{"name":"","type":"process_array","links":[342]}],"properties":{}},{"id":214,"type":"processes/interval","pos":[-38,-2],"size":{"0":210,"1":82},"flags":{},"order":8,"mode":0,"outputs":[{"name":"","type":"process_array","links":[344]}],"properties":{}},{"id":149,"type":"model_part/ParsedModelPart","pos":[-1041,-242],"size":{"0":388,"1":142},"flags":{},"order":9,"mode":0,"outputs":[{"name":".Parts_Solid_Solid_Auto1","type":"string","links":[331]},{"name":".DISPLACEMENT_Displacement_Auto1","type":"string","links":[339]},{"name":".SurfacePressure3D_Pressure_on_surfaces_Auto2","type":"string","links":[346]},{"name":".SurfacePressure3D_Pressure_on_surfaces_Auto3","type":"string","links":[347]}],"properties":{"submodelpart_list":[".Parts_Solid_Solid_Auto1",".DISPLACEMENT_Displacement_Auto1",".SurfacePressure3D_Pressure_on_surfaces_Auto2",".SurfacePressure3D_Pressure_on_surfaces_Auto3"]},"widgets_values":["Structure.COMPUTE_HROM",""]},{"id":212,"type":"processes/list","pos":[539,-11],"size":{"0":140,"1":66},"flags":{},"order":18,"mode":0,"inputs":[{"name":"In0","type":"process","link":348},{"name":"In1","type":"process","link":349},{"name":"In2","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[327]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":175,"type":"processes/list","pos":[533,-98],"size":{"0":140,"1":46},"flags":{},"order":17,"mode":0,"inputs":[{"name":"In0","type":"process","link":343},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[308]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":45,"type":"model_part/OutputView","pos":[1435,-63],"size":{"0":638.62109375,"1":2610},"flags":{"collapsed":false},"order":24,"mode":0,"inputs":[{"name":"json","type":0,"link":313}],"properties":{}},{"id":217,"type":"processes/interval","pos":[-34,182],"size":{"0":210,"1":82},"flags":{},"order":10,"mode":0,"outputs":[{"name":"","type":"process_array","links":[345]}],"properties":{}},{"id":220,"type":"processes/AssignScalarVariableToConditionsProcess","pos":[263,87],"size":{"0":210,"1":102},"flags":{},"order":15,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":347},{"name":"interval","type":"process_array","link":345}],"outputs":[{"name":"Process","type":"process","links":[349]}],"properties":{"python_module":"assign_scalar_variable_to_conditions_process","kratos_module":"KratosMultiphysics","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.SurfacePressure3D_Pressure_on_surfaces_Auto3","variable_name":"POSITIVE_FACE_PRESSURE","value":"0","interval":[0,"End"]}},"widgets_values":["POSITIVE_FACE_PRESSURE","0"]},{"id":218,"type":"processes/AssignVectorVariableProcess","pos":[-27,-243],"size":{"0":210,"1":118},"flags":{},"order":13,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":339},{"name":"interval","type":"process_array","link":340},{"name":"constrained","type":"process_array","link":341},{"name":"value","type":"process_array","link":342}],"outputs":[{"name":"Process","type":"process","links":[343]}],"properties":{"python_module":"assign_vector_variable_process","kratos_module":"KratosMultiphysics","process_name":"AssignVectorVariableProcess","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.DISPLACEMENT_Displacement_Auto1","variable_name":"DISPLACEMENT","interval":[0,"End"],"constrained":[true,true,true],"value":[0,0,0]}},"widgets_values":["DISPLACEMENT"]},{"id":219,"type":"processes/AssignScalarVariableToConditionsProcess","pos":[261,-65],"size":{"0":210,"1":102},"flags":{},"order":14,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":346},{"name":"interval","type":"process_array","link":344}],"outputs":[{"name":"Process","type":"process","links":[348]}],"properties":{"python_module":"assign_scalar_variable_to_conditions_process","kratos_module":"KratosMultiphysics","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.SurfacePressure3D_Pressure_on_surfaces_Auto2","variable_name":"POSITIVE_FACE_PRESSURE","value":"0","interval":[0,"End"]}},"widgets_values":["POSITIVE_FACE_PRESSURE","0"]}],"links":[[249,14,0,176,0,"material_array"],[250,176,0,177,0,"string"],[292,203,0,23,0,"process"],[304,23,0,206,6,"process_array"],[305,19,0,206,5,"process_array"],[306,204,0,206,4,"process_array"],[308,175,0,206,2,"process_array"],[310,4,0,206,0,"map"],[312,206,0,32,0,0],[313,206,0,45,0,0],[314,172,0,207,0,"map"],[315,177,0,207,1,"map"],[316,207,0,206,1,"map"],[321,208,0,14,0,"material"],[327,212,0,206,3,"process_array"],[331,149,0,208,0,"string"],[339,149,1,218,0,"string"],[340,197,0,218,1,"process_array"],[341,195,0,218,2,"process_array"],[342,186,0,218,3,"process_array"],[343,218,0,175,0,"process"],[344,214,0,219,1,"process_array"],[345,217,0,220,1,"process_array"],[346,149,2,219,0,"string"],[347,149,3,220,0,"string"],[348,219,0,212,0,"process"],[349,220,0,212,1,"process"]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file From ad20de940de481e160d7c3e1eed3beb33ee20dc7 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Wed, 28 Jul 2021 16:35:31 +0200 Subject: [PATCH 31/45] Add new force node --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index c943c59..5d1e792 100644 --- a/index.html +++ b/index.html @@ -82,6 +82,7 @@ + From d85fdd9a6e07f2d471ce4e53cd864a31078d420a Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Wed, 28 Jul 2021 16:36:25 +0200 Subject: [PATCH 32/45] More possible problem types --- js/nodes/materials/material_writer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/nodes/materials/material_writer.js b/js/nodes/materials/material_writer.js index 45e58a2..b5cb31d 100644 --- a/js/nodes/materials/material_writer.js +++ b/js/nodes/materials/material_writer.js @@ -1,7 +1,7 @@ class MaterialWriter { constructor() { - this.material_file_name = this.addWidget("string","Materials Filenae", "Materials.json"); + this.material_file_name = this.addWidget("combo","Materials Filename", "Materials.json",function(v){}, { values:["Materials.json","StructuralMaterials.json","StructuralMaterials_HROM.json"]}); this.addInput("Material List","material_array"); this.addOutput("Material","string"); this.size = this.computeSize(); From 2724d7f4964940258109a134438d5d81fbfed08e Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Wed, 28 Jul 2021 16:37:39 +0200 Subject: [PATCH 33/45] Add another problem type --- js/nodes/materials/structural_material.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/nodes/materials/structural_material.js b/js/nodes/materials/structural_material.js index d8ef2bb..c9c5fb0 100644 --- a/js/nodes/materials/structural_material.js +++ b/js/nodes/materials/structural_material.js @@ -21,7 +21,7 @@ class StructuralMaterial { }; this.properties_id = this.addWidget("combo","Properties_ID", 1, function(v){}, { values:[1, 2, 3, 4, 5]} ); - this.name = this.addWidget("text","Name", "LinearElasticPlaneStress2DLaw", function(v){}, function(v){}, {} ); + this.name = this.addWidget("combo","Name", "LinearElasticPlaneStress2DLaw", function(v){}, { values:["LinearElasticPlaneStress2DLaw","LinearElastic3DLaw"]} ); this.DENSITY= this.addWidget("number","Density", 7850.0, function(v){}, {}); this.YOUNG_MODULUS = this.addWidget("number","Young_Modulus", 206900000000.0, function(v){}, {}); this.POISSON_RATIO = this.addWidget("number","Poisson_Ratio", 0.29, function(v){}, {}); From c5e59d24569d6cfcb959f0566a25fddd1cbe7b44 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Wed, 28 Jul 2021 16:38:51 +0200 Subject: [PATCH 34/45] Actualization of the example --- resources/examples/StructuralMechanics.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/examples/StructuralMechanics.json b/resources/examples/StructuralMechanics.json index 88003f2..7e058ec 100644 --- a/resources/examples/StructuralMechanics.json +++ b/resources/examples/StructuralMechanics.json @@ -1 +1 @@ -{"last_node_id":220,"last_link_id":349,"nodes":[{"id":206,"type":"parameters/StructuralProjectParameters","pos":[1008,-130],"size":{"0":362.79998779296875,"1":146},"flags":{},"order":22,"mode":0,"inputs":[{"name":"problem_data","type":"map","link":310},{"name":"solver_settings","type":"map","link":316},{"name":"constraints_process_list","type":"process_array","link":308},{"name":"loads_process_list","type":"process_array","link":327},{"name":"list_other_processes","type":"process_array","link":306},{"name":"gid_output","type":"process_array","link":305},{"name":"vtk_output","type":"process_array","link":304}],"outputs":[{"name":"project_parameters","type":"map","links":[312,313]}],"properties":{}},{"id":177,"type":"solver_settings_aux_nodes/MaterialImportSettings","pos":[123,-373],"size":{"0":287.20001220703125,"1":26},"flags":{},"order":20,"mode":0,"inputs":[{"name":"Materials filename","type":"string","link":250}],"outputs":[{"name":"solver_settings","type":"map","links":[315]}],"properties":{"materials_filename":""}},{"id":14,"type":"materials/materials_list","pos":[-323,-428],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":16,"mode":0,"inputs":[{"name":"In0","type":"material","link":321},{"name":"In1","type":"material","link":null}],"outputs":[{"name":"array","type":"material_array","links":[249]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":176,"type":"materials/Material Writer","pos":[-147,-423],"size":{"0":210,"1":58},"flags":{},"order":19,"mode":0,"inputs":[{"name":"Material List","type":"material_array","link":249}],"outputs":[{"name":"Material","type":"string","links":[250]}],"properties":{}},{"id":19,"type":"processes/list","pos":[631,213],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":0,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[305]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":204,"type":"processes/list","pos":[670,81],"size":{"0":140,"1":46},"flags":{},"order":1,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[306]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":208,"type":"materials/StructuralMaterial","pos":[-563,-431],"size":{"0":210,"1":174},"flags":{},"order":12,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":331},{"name":"tables","type":"process_array","link":null}],"outputs":[{"name":"Material","type":"material","links":[321]}],"properties":{"model_part_name":"Structure.Parts_Solid_Solid_Auto1","properties_id":1,"Material":{"constitutive_law":{"name":"LinearElasticPlaneStress2DLaw"},"Variables":{"DENSITY":7850,"YOUNG_MODULUS":206900000000,"POISSON_RATIO":0.29,"THICKNESS":0.1},"Tables":{}}}},{"id":23,"type":"processes/list","pos":[611,309],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":11,"mode":0,"inputs":[{"name":"In0","type":"process","link":292},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[304]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":4,"type":"parameters/ProblemData","pos":[558,-298],"size":{"0":140,"1":86},"flags":{"collapsed":false},"order":2,"mode":0,"outputs":[{"name":"problem_data","type":"map","links":[310]},{"name":"problem_name","type":"string","links":null},{"name":"start_time","type":"number","links":null},{"name":"end_time","type":"number","links":null}],"properties":{"problem_name":"Wing4","parallel_type":"OpenMP","echo_level":1,"start_time":0,"end_time":30}},{"id":203,"type":"output_processes/VTK_structural","pos":[372,292],"size":{"0":210,"1":58},"flags":{"collapsed":false},"order":3,"mode":0,"outputs":[{"name":"Process","type":"process","links":[292]}],"properties":{"python_module":"vtk_output_process","kratos_module":"KratosMultiphysics","process_name":"VtkOutputProcess","help":"This process writes postprocessing files for Paraview","Parameters":{"model_part_name":"Structure.VISUALIZE_HROM","output_control_type":"step","output_interval":1,"file_format":"ascii","output_precision":7,"output_sub_model_parts":false,"folder_name":"vtk_output","save_output_files_in_folder":true,"nodal_solution_step_data_variables":["DISPLACEMENT","REACTION"],"nodal_data_value_variables":[],"element_data_value_variables":[],"condition_data_value_variables":[],"gauss_point_variables_extrapolated_to_nodes":["VON_MISES_STRESS"]}}},{"id":207,"type":"solver_settings/StructuralMechanicsSolver","pos":[439,-460],"size":{"0":337.6000061035156,"1":78},"flags":{},"order":21,"mode":0,"inputs":[{"name":"model_import_settings","type":"map","link":314},{"name":"material_import_settings","type":"map","link":315}],"outputs":[{"name":"solver_settings","type":"map","links":[316]}],"properties":{"solver_type":"Static","model_part_name":"Structure","domain_size":3,"echo_level":0,"analysis_type":"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,"volumetric_strain_dofs":false,"problem_domain_sub_model_part_list":["COMPUTE_HROM, VISUALIZE_HROM"],"processes_sub_model_part_list":["COMPUTE_HROM, VISUALIZE_HROM"]}},{"id":172,"type":"solver_settings_aux_nodes/ModelImportSettings","pos":[152,-505],"size":{"0":210,"1":82},"flags":{},"order":4,"mode":0,"outputs":[{"name":"solver_settings","type":"map","links":[314]}],"properties":{"input_filename":""}},{"id":32,"type":"basic/DownloadProblem","pos":[1431,-198],"size":{"0":210,"1":78},"flags":{"collapsed":false},"order":23,"mode":0,"inputs":[{"name":"data","type":0,"link":312},{"name":"download","type":-1,"link":null}],"properties":{"filename":"data.json"}},{"id":197,"type":"processes/interval","pos":[-418,-114],"size":{"0":210,"1":82},"flags":{},"order":5,"mode":0,"outputs":[{"name":"","type":"process_array","links":[340]}],"properties":{}},{"id":195,"type":"processes/BooleanList","pos":[-419,17],"size":{"0":210,"1":106},"flags":{},"order":6,"mode":0,"outputs":[{"name":"","type":"process_array","links":[341]}],"properties":{}},{"id":186,"type":"processes/Vector","pos":[-421,164],"size":{"0":210,"1":106},"flags":{},"order":7,"mode":0,"outputs":[{"name":"","type":"process_array","links":[342]}],"properties":{}},{"id":214,"type":"processes/interval","pos":[-38,-2],"size":{"0":210,"1":82},"flags":{},"order":8,"mode":0,"outputs":[{"name":"","type":"process_array","links":[344]}],"properties":{}},{"id":149,"type":"model_part/ParsedModelPart","pos":[-1041,-242],"size":{"0":388,"1":142},"flags":{},"order":9,"mode":0,"outputs":[{"name":".Parts_Solid_Solid_Auto1","type":"string","links":[331]},{"name":".DISPLACEMENT_Displacement_Auto1","type":"string","links":[339]},{"name":".SurfacePressure3D_Pressure_on_surfaces_Auto2","type":"string","links":[346]},{"name":".SurfacePressure3D_Pressure_on_surfaces_Auto3","type":"string","links":[347]}],"properties":{"submodelpart_list":[".Parts_Solid_Solid_Auto1",".DISPLACEMENT_Displacement_Auto1",".SurfacePressure3D_Pressure_on_surfaces_Auto2",".SurfacePressure3D_Pressure_on_surfaces_Auto3"]},"widgets_values":["Structure.COMPUTE_HROM",""]},{"id":212,"type":"processes/list","pos":[539,-11],"size":{"0":140,"1":66},"flags":{},"order":18,"mode":0,"inputs":[{"name":"In0","type":"process","link":348},{"name":"In1","type":"process","link":349},{"name":"In2","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[327]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":175,"type":"processes/list","pos":[533,-98],"size":{"0":140,"1":46},"flags":{},"order":17,"mode":0,"inputs":[{"name":"In0","type":"process","link":343},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[308]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":45,"type":"model_part/OutputView","pos":[1435,-63],"size":{"0":638.62109375,"1":2610},"flags":{"collapsed":false},"order":24,"mode":0,"inputs":[{"name":"json","type":0,"link":313}],"properties":{}},{"id":217,"type":"processes/interval","pos":[-34,182],"size":{"0":210,"1":82},"flags":{},"order":10,"mode":0,"outputs":[{"name":"","type":"process_array","links":[345]}],"properties":{}},{"id":220,"type":"processes/AssignScalarVariableToConditionsProcess","pos":[263,87],"size":{"0":210,"1":102},"flags":{},"order":15,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":347},{"name":"interval","type":"process_array","link":345}],"outputs":[{"name":"Process","type":"process","links":[349]}],"properties":{"python_module":"assign_scalar_variable_to_conditions_process","kratos_module":"KratosMultiphysics","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.SurfacePressure3D_Pressure_on_surfaces_Auto3","variable_name":"POSITIVE_FACE_PRESSURE","value":"0","interval":[0,"End"]}},"widgets_values":["POSITIVE_FACE_PRESSURE","0"]},{"id":218,"type":"processes/AssignVectorVariableProcess","pos":[-27,-243],"size":{"0":210,"1":118},"flags":{},"order":13,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":339},{"name":"interval","type":"process_array","link":340},{"name":"constrained","type":"process_array","link":341},{"name":"value","type":"process_array","link":342}],"outputs":[{"name":"Process","type":"process","links":[343]}],"properties":{"python_module":"assign_vector_variable_process","kratos_module":"KratosMultiphysics","process_name":"AssignVectorVariableProcess","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.DISPLACEMENT_Displacement_Auto1","variable_name":"DISPLACEMENT","interval":[0,"End"],"constrained":[true,true,true],"value":[0,0,0]}},"widgets_values":["DISPLACEMENT"]},{"id":219,"type":"processes/AssignScalarVariableToConditionsProcess","pos":[261,-65],"size":{"0":210,"1":102},"flags":{},"order":14,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":346},{"name":"interval","type":"process_array","link":344}],"outputs":[{"name":"Process","type":"process","links":[348]}],"properties":{"python_module":"assign_scalar_variable_to_conditions_process","kratos_module":"KratosMultiphysics","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.SurfacePressure3D_Pressure_on_surfaces_Auto2","variable_name":"POSITIVE_FACE_PRESSURE","value":"0","interval":[0,"End"]}},"widgets_values":["POSITIVE_FACE_PRESSURE","0"]}],"links":[[249,14,0,176,0,"material_array"],[250,176,0,177,0,"string"],[292,203,0,23,0,"process"],[304,23,0,206,6,"process_array"],[305,19,0,206,5,"process_array"],[306,204,0,206,4,"process_array"],[308,175,0,206,2,"process_array"],[310,4,0,206,0,"map"],[312,206,0,32,0,0],[313,206,0,45,0,0],[314,172,0,207,0,"map"],[315,177,0,207,1,"map"],[316,207,0,206,1,"map"],[321,208,0,14,0,"material"],[327,212,0,206,3,"process_array"],[331,149,0,208,0,"string"],[339,149,1,218,0,"string"],[340,197,0,218,1,"process_array"],[341,195,0,218,2,"process_array"],[342,186,0,218,3,"process_array"],[343,218,0,175,0,"process"],[344,214,0,219,1,"process_array"],[345,217,0,220,1,"process_array"],[346,149,2,219,0,"string"],[347,149,3,220,0,"string"],[348,219,0,212,0,"process"],[349,220,0,212,1,"process"]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file +{"last_node_id":212,"last_link_id":341,"nodes":[{"id":14,"type":"materials/materials_list","pos":[-16,-388],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":16,"mode":0,"inputs":[{"name":"In0","type":"material","link":290},{"name":"In1","type":"material","link":null}],"outputs":[{"name":"array","type":"material_array","links":[249]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":201,"type":"materials/StructuralMaterial","pos":[-268,-397],"size":{"0":210,"1":198},"flags":{},"order":13,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":330},{"name":"tables","type":"process_array","link":null}],"outputs":[{"name":"Material","type":"material","links":[290]}],"properties":{"model_part_name":"Structure.Parts_Solid_Solid_Auto1","properties_id":1,"Material":{"constitutive_law":{"name":"LinearElasticPlaneStress2DLaw"},"Variables":{"DENSITY":7850,"YOUNG_MODULUS":206900000000,"POISSON_RATIO":0.29,"THICKNESS":0.1},"Tables":{}}}},{"id":23,"type":"processes/list","pos":[1236,572],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":11,"mode":0,"inputs":[{"name":"In0","type":"process","link":292},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[304]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":19,"type":"processes/list","pos":[1232,464],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":12,"mode":0,"inputs":[{"name":"In0","type":"process","link":291},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[305]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":168,"type":"processes/list","pos":[542,389],"size":{"0":140,"1":46},"flags":{},"order":18,"mode":0,"inputs":[{"name":"In0","type":"process","link":341},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[307]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":4,"type":"parameters/ProblemData","pos":[1562,-337],"size":{"0":140,"1":86},"flags":{"collapsed":false},"order":0,"mode":0,"outputs":[{"name":"problem_data","type":"map","links":[310]},{"name":"problem_name","type":"string","links":null},{"name":"start_time","type":"number","links":null},{"name":"end_time","type":"number","links":null}],"properties":{"problem_name":"SWQ","parallel_type":"OpenMP","echo_level":1,"start_time":0,"end_time":10}},{"id":206,"type":"parameters/StructuralProjectParameters","pos":[1865,-34],"size":{"0":362.79998779296875,"1":146},"flags":{},"order":22,"mode":0,"inputs":[{"name":"problem_data","type":"map","link":310},{"name":"solver_settings","type":"map","link":317},{"name":"constraints_process_list","type":"process_array","link":308},{"name":"loads_process_list","type":"process_array","link":307},{"name":"list_other_processes","type":"process_array","link":306},{"name":"gid_output","type":"process_array","link":305},{"name":"vtk_output","type":"process_array","link":304}],"outputs":[{"name":"project_parameters","type":"map","links":[312,313]}],"properties":{}},{"id":204,"type":"processes/list","pos":[1523,180],"size":{"0":140,"1":46},"flags":{},"order":1,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[306]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":207,"type":"solver_settings/StructuralMechanicsSolver","pos":[720,-466],"size":{"0":337.6000061035156,"1":78},"flags":{},"order":21,"mode":0,"inputs":[{"name":"model_import_settings","type":"map","link":333},{"name":"material_import_settings","type":"map","link":315}],"outputs":[{"name":"solver_settings","type":"map","links":[317]}],"properties":{"solver_type":"static","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,"volumetric_strain_dofs":false}},{"id":195,"type":"processes/BooleanList","pos":[2,43],"size":{"0":210,"1":106},"flags":{},"order":2,"mode":0,"outputs":[{"name":"","type":"process_array","links":[320]}],"properties":{}},{"id":175,"type":"processes/list","pos":[549,-86],"size":{"0":140,"1":46},"flags":{},"order":17,"mode":0,"inputs":[{"name":"In0","type":"process","link":322},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[308]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":177,"type":"solver_settings_aux_nodes/MaterialImportSettings","pos":[396,-396],"size":{"0":287.20001220703125,"1":26},"flags":{},"order":20,"mode":0,"inputs":[{"name":"Materials filename","type":"string","link":250}],"outputs":[{"name":"solver_settings","type":"map","links":[315]}],"properties":{"materials_filename":""}},{"id":203,"type":"output_processes/VTK_structural","pos":[912,574],"size":{"0":295.8047180175781,"1":63.23921203613281},"flags":{},"order":4,"mode":0,"outputs":[{"name":"Process","type":"process","links":[292]}],"properties":{"python_module":"vtk_output_process","kratos_module":"KratosMultiphysics","process_name":"VtkOutputProcess","help":"This process writes postprocessing files for Paraview","Parameters":{"model_part_name":"Structure","output_control_type":"step","output_interval":1,"file_format":"ascii","output_precision":7,"output_sub_model_parts":false,"folder_name":"vtk_output","save_output_files_in_folder":true,"nodal_solution_step_data_variables":["DISPLACEMENT","REACTION"],"nodal_data_value_variables":[],"element_data_value_variables":[],"condition_data_value_variables":[],"gauss_point_variables_extrapolated_to_nodes":["VON_MISES_STRESS"]}}},{"id":202,"type":"output_processes/GiDStructural","pos":[972,446],"size":{"0":210,"1":82},"flags":{},"order":5,"mode":0,"outputs":[{"name":"Process","type":"process","links":[291]}],"properties":{"python_module":"gid_output_process","kratos_module":"KratosMultiphysics","process_name":"GiDOutputProcess","help":"This process writes postprocessing files for GiD","Parameters":{"model_part_name":"Structure","output_name":"SWQ","postprocess_parameters":{"result_file_configuration":{"gidpost_flags":{"GiDPostMode":"GiD_PostBinary","WriteDeformedMeshFlag":"WriteDeformed","WriteConditionsFlag":"WriteConditions","MultiFileFlag":"SingleFile"},"file_label":"step","output_control_type":"step","output_interval":1,"body_output":true,"node_output":false,"skin_output":false,"plane_output":[],"nodal_results":["DISPLACEMENT","REACTION"],"gauss_point_results":["VON_MISES_STRESS"],"nodal_nonhistorical_results":[]},"point_data_configuration":[]}}}},{"id":208,"type":"processes/AssignVectorVariableProcess","pos":[274,-85],"size":{"0":210,"1":118},"flags":{},"order":14,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":331},{"name":"interval","type":"process_array","link":319},{"name":"constrained","type":"process_array","link":320},{"name":"value","type":"process_array","link":321}],"outputs":[{"name":"Process","type":"process","links":[322]}],"properties":{"python_module":"assign_vector_variable_process","kratos_module":"KratosMultiphysics","process_name":"AssignVectorVariableProcess","Parameters":{"model_part_name":"Structure.DISPLACEMENT_Displacement_Auto1","variable_name":"DISPLACEMENT","interval":[0,"End"],"constrained":[true,true,true],"value":[0,-1,0]}},"widgets_values":["DISPLACEMENT"]},{"id":197,"type":"processes/interval","pos":[3,-81],"size":{"0":210,"1":82},"flags":{},"order":7,"mode":0,"outputs":[{"name":"","type":"process_array","links":[319]}],"properties":{}},{"id":149,"type":"model_part/ParsedModelPart","pos":[-929,-59],"size":{"0":278.79998779296875,"1":122},"flags":{},"order":8,"mode":0,"outputs":[{"name":".Parts_Solid_Solid_Auto1","type":"string","links":[330]},{"name":".DISPLACEMENT_Displacement_Auto1","type":"string","links":[331]},{"name":".LineLoad2D_Load_on_lines_Auto1","type":"string","links":[338]}],"properties":{"submodelpart_list":[".Parts_Solid_Solid_Auto1",".DISPLACEMENT_Displacement_Auto1",".LineLoad2D_Load_on_lines_Auto1"]},"widgets_values":["Structure",""]},{"id":199,"type":"processes/interval","pos":[-1,412],"size":{"0":210,"1":82},"flags":{},"order":9,"mode":0,"outputs":[{"name":"","type":"process_array","links":[339]}],"properties":{}},{"id":189,"type":"processes/Vector","pos":[-5,537],"size":{"0":210,"1":106},"flags":{},"order":10,"mode":0,"outputs":[{"name":"","type":"process_array","links":[340]}],"properties":{}},{"id":212,"type":"processes/AssignVectorByDirectionToConditionProcess","pos":[272,357],"size":{"0":210,"1":122},"flags":{},"order":15,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":338},{"name":"interval","type":"process_array","link":339},{"name":"direction","type":"process_array","link":340}],"outputs":[{"name":"Process","type":"process","links":[341]}],"properties":{"python_module":"assign_vector_by_direction_to_condition_process","kratos_module":"KratosMultiphysics","check":"DirectorVectorNonZero direction","process_name":"AssignVectorByDirectionToConditionProcess","Parameters":{"model_part_name":"Structure.LineLoad2D_Load_on_lines_Auto1","variable_name":"LINE_LOAD","interval":[0,"End"],"modulus":100000,"direction":[0,0,0]}},"widgets_values":["LINE_LOAD",100000]},{"id":210,"type":"solver_settings_aux_nodes/ModelImportSettings","pos":[455,-528],"size":{"0":210,"1":82},"flags":{},"order":6,"mode":0,"outputs":[{"name":"solver_settings","type":"map","links":[333]}],"properties":{"input_filename":""}},{"id":176,"type":"materials/Material Writer","pos":[134,-389],"size":{"0":210,"1":58},"flags":{},"order":19,"mode":0,"inputs":[{"name":"Material List","type":"material_array","link":249}],"outputs":[{"name":"Material","type":"string","links":[250]}],"properties":{}},{"id":45,"type":"model_part/OutputView","pos":[2294,55],"size":{"0":473.22265625,"1":3110},"flags":{"collapsed":false},"order":24,"mode":0,"inputs":[{"name":"json","type":0,"link":313}],"properties":{}},{"id":32,"type":"basic/DownloadProblem","pos":[2265,-60],"size":{"0":210,"1":78},"flags":{"collapsed":false},"order":23,"mode":0,"inputs":[{"name":"data","type":0,"link":312},{"name":"download","type":-1,"link":null}],"properties":{"filename":"data.json"}},{"id":186,"type":"processes/Vector","pos":[5,190],"size":{"0":210,"1":106},"flags":{},"order":3,"mode":0,"outputs":[{"name":"","type":"process_array","links":[321]}],"properties":{}}],"links":[[249,14,0,176,0,"material_array"],[250,176,0,177,0,"string"],[290,201,0,14,0,"material"],[291,202,0,19,0,"process"],[292,203,0,23,0,"process"],[304,23,0,206,6,"process_array"],[305,19,0,206,5,"process_array"],[306,204,0,206,4,"process_array"],[307,168,0,206,3,"process_array"],[308,175,0,206,2,"process_array"],[310,4,0,206,0,"map"],[312,206,0,32,0,0],[313,206,0,45,0,0],[315,177,0,207,1,"map"],[317,207,0,206,1,"map"],[319,197,0,208,1,"process_array"],[320,195,0,208,2,"process_array"],[321,186,0,208,3,"process_array"],[322,208,0,175,0,"process"],[330,149,0,201,0,"string"],[331,149,1,208,0,"string"],[333,210,0,207,0,"map"],[338,149,2,212,0,"string"],[339,199,0,212,1,"process_array"],[340,189,0,212,2,"process_array"],[341,212,0,168,0,"process"]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file From 993a9382c16adc4a42d7fd862494ef797950209d Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Wed, 28 Jul 2021 16:39:38 +0200 Subject: [PATCH 35/45] A new example --- resources/examples/StructuralMechanics_HROM.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 resources/examples/StructuralMechanics_HROM.json diff --git a/resources/examples/StructuralMechanics_HROM.json b/resources/examples/StructuralMechanics_HROM.json new file mode 100644 index 0000000..88003f2 --- /dev/null +++ b/resources/examples/StructuralMechanics_HROM.json @@ -0,0 +1 @@ +{"last_node_id":220,"last_link_id":349,"nodes":[{"id":206,"type":"parameters/StructuralProjectParameters","pos":[1008,-130],"size":{"0":362.79998779296875,"1":146},"flags":{},"order":22,"mode":0,"inputs":[{"name":"problem_data","type":"map","link":310},{"name":"solver_settings","type":"map","link":316},{"name":"constraints_process_list","type":"process_array","link":308},{"name":"loads_process_list","type":"process_array","link":327},{"name":"list_other_processes","type":"process_array","link":306},{"name":"gid_output","type":"process_array","link":305},{"name":"vtk_output","type":"process_array","link":304}],"outputs":[{"name":"project_parameters","type":"map","links":[312,313]}],"properties":{}},{"id":177,"type":"solver_settings_aux_nodes/MaterialImportSettings","pos":[123,-373],"size":{"0":287.20001220703125,"1":26},"flags":{},"order":20,"mode":0,"inputs":[{"name":"Materials filename","type":"string","link":250}],"outputs":[{"name":"solver_settings","type":"map","links":[315]}],"properties":{"materials_filename":""}},{"id":14,"type":"materials/materials_list","pos":[-323,-428],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":16,"mode":0,"inputs":[{"name":"In0","type":"material","link":321},{"name":"In1","type":"material","link":null}],"outputs":[{"name":"array","type":"material_array","links":[249]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":176,"type":"materials/Material Writer","pos":[-147,-423],"size":{"0":210,"1":58},"flags":{},"order":19,"mode":0,"inputs":[{"name":"Material List","type":"material_array","link":249}],"outputs":[{"name":"Material","type":"string","links":[250]}],"properties":{}},{"id":19,"type":"processes/list","pos":[631,213],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":0,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[305]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":204,"type":"processes/list","pos":[670,81],"size":{"0":140,"1":46},"flags":{},"order":1,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[306]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":208,"type":"materials/StructuralMaterial","pos":[-563,-431],"size":{"0":210,"1":174},"flags":{},"order":12,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":331},{"name":"tables","type":"process_array","link":null}],"outputs":[{"name":"Material","type":"material","links":[321]}],"properties":{"model_part_name":"Structure.Parts_Solid_Solid_Auto1","properties_id":1,"Material":{"constitutive_law":{"name":"LinearElasticPlaneStress2DLaw"},"Variables":{"DENSITY":7850,"YOUNG_MODULUS":206900000000,"POISSON_RATIO":0.29,"THICKNESS":0.1},"Tables":{}}}},{"id":23,"type":"processes/list","pos":[611,309],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":11,"mode":0,"inputs":[{"name":"In0","type":"process","link":292},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[304]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":4,"type":"parameters/ProblemData","pos":[558,-298],"size":{"0":140,"1":86},"flags":{"collapsed":false},"order":2,"mode":0,"outputs":[{"name":"problem_data","type":"map","links":[310]},{"name":"problem_name","type":"string","links":null},{"name":"start_time","type":"number","links":null},{"name":"end_time","type":"number","links":null}],"properties":{"problem_name":"Wing4","parallel_type":"OpenMP","echo_level":1,"start_time":0,"end_time":30}},{"id":203,"type":"output_processes/VTK_structural","pos":[372,292],"size":{"0":210,"1":58},"flags":{"collapsed":false},"order":3,"mode":0,"outputs":[{"name":"Process","type":"process","links":[292]}],"properties":{"python_module":"vtk_output_process","kratos_module":"KratosMultiphysics","process_name":"VtkOutputProcess","help":"This process writes postprocessing files for Paraview","Parameters":{"model_part_name":"Structure.VISUALIZE_HROM","output_control_type":"step","output_interval":1,"file_format":"ascii","output_precision":7,"output_sub_model_parts":false,"folder_name":"vtk_output","save_output_files_in_folder":true,"nodal_solution_step_data_variables":["DISPLACEMENT","REACTION"],"nodal_data_value_variables":[],"element_data_value_variables":[],"condition_data_value_variables":[],"gauss_point_variables_extrapolated_to_nodes":["VON_MISES_STRESS"]}}},{"id":207,"type":"solver_settings/StructuralMechanicsSolver","pos":[439,-460],"size":{"0":337.6000061035156,"1":78},"flags":{},"order":21,"mode":0,"inputs":[{"name":"model_import_settings","type":"map","link":314},{"name":"material_import_settings","type":"map","link":315}],"outputs":[{"name":"solver_settings","type":"map","links":[316]}],"properties":{"solver_type":"Static","model_part_name":"Structure","domain_size":3,"echo_level":0,"analysis_type":"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,"volumetric_strain_dofs":false,"problem_domain_sub_model_part_list":["COMPUTE_HROM, VISUALIZE_HROM"],"processes_sub_model_part_list":["COMPUTE_HROM, VISUALIZE_HROM"]}},{"id":172,"type":"solver_settings_aux_nodes/ModelImportSettings","pos":[152,-505],"size":{"0":210,"1":82},"flags":{},"order":4,"mode":0,"outputs":[{"name":"solver_settings","type":"map","links":[314]}],"properties":{"input_filename":""}},{"id":32,"type":"basic/DownloadProblem","pos":[1431,-198],"size":{"0":210,"1":78},"flags":{"collapsed":false},"order":23,"mode":0,"inputs":[{"name":"data","type":0,"link":312},{"name":"download","type":-1,"link":null}],"properties":{"filename":"data.json"}},{"id":197,"type":"processes/interval","pos":[-418,-114],"size":{"0":210,"1":82},"flags":{},"order":5,"mode":0,"outputs":[{"name":"","type":"process_array","links":[340]}],"properties":{}},{"id":195,"type":"processes/BooleanList","pos":[-419,17],"size":{"0":210,"1":106},"flags":{},"order":6,"mode":0,"outputs":[{"name":"","type":"process_array","links":[341]}],"properties":{}},{"id":186,"type":"processes/Vector","pos":[-421,164],"size":{"0":210,"1":106},"flags":{},"order":7,"mode":0,"outputs":[{"name":"","type":"process_array","links":[342]}],"properties":{}},{"id":214,"type":"processes/interval","pos":[-38,-2],"size":{"0":210,"1":82},"flags":{},"order":8,"mode":0,"outputs":[{"name":"","type":"process_array","links":[344]}],"properties":{}},{"id":149,"type":"model_part/ParsedModelPart","pos":[-1041,-242],"size":{"0":388,"1":142},"flags":{},"order":9,"mode":0,"outputs":[{"name":".Parts_Solid_Solid_Auto1","type":"string","links":[331]},{"name":".DISPLACEMENT_Displacement_Auto1","type":"string","links":[339]},{"name":".SurfacePressure3D_Pressure_on_surfaces_Auto2","type":"string","links":[346]},{"name":".SurfacePressure3D_Pressure_on_surfaces_Auto3","type":"string","links":[347]}],"properties":{"submodelpart_list":[".Parts_Solid_Solid_Auto1",".DISPLACEMENT_Displacement_Auto1",".SurfacePressure3D_Pressure_on_surfaces_Auto2",".SurfacePressure3D_Pressure_on_surfaces_Auto3"]},"widgets_values":["Structure.COMPUTE_HROM",""]},{"id":212,"type":"processes/list","pos":[539,-11],"size":{"0":140,"1":66},"flags":{},"order":18,"mode":0,"inputs":[{"name":"In0","type":"process","link":348},{"name":"In1","type":"process","link":349},{"name":"In2","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[327]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":175,"type":"processes/list","pos":[533,-98],"size":{"0":140,"1":46},"flags":{},"order":17,"mode":0,"inputs":[{"name":"In0","type":"process","link":343},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[308]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":45,"type":"model_part/OutputView","pos":[1435,-63],"size":{"0":638.62109375,"1":2610},"flags":{"collapsed":false},"order":24,"mode":0,"inputs":[{"name":"json","type":0,"link":313}],"properties":{}},{"id":217,"type":"processes/interval","pos":[-34,182],"size":{"0":210,"1":82},"flags":{},"order":10,"mode":0,"outputs":[{"name":"","type":"process_array","links":[345]}],"properties":{}},{"id":220,"type":"processes/AssignScalarVariableToConditionsProcess","pos":[263,87],"size":{"0":210,"1":102},"flags":{},"order":15,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":347},{"name":"interval","type":"process_array","link":345}],"outputs":[{"name":"Process","type":"process","links":[349]}],"properties":{"python_module":"assign_scalar_variable_to_conditions_process","kratos_module":"KratosMultiphysics","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.SurfacePressure3D_Pressure_on_surfaces_Auto3","variable_name":"POSITIVE_FACE_PRESSURE","value":"0","interval":[0,"End"]}},"widgets_values":["POSITIVE_FACE_PRESSURE","0"]},{"id":218,"type":"processes/AssignVectorVariableProcess","pos":[-27,-243],"size":{"0":210,"1":118},"flags":{},"order":13,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":339},{"name":"interval","type":"process_array","link":340},{"name":"constrained","type":"process_array","link":341},{"name":"value","type":"process_array","link":342}],"outputs":[{"name":"Process","type":"process","links":[343]}],"properties":{"python_module":"assign_vector_variable_process","kratos_module":"KratosMultiphysics","process_name":"AssignVectorVariableProcess","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.DISPLACEMENT_Displacement_Auto1","variable_name":"DISPLACEMENT","interval":[0,"End"],"constrained":[true,true,true],"value":[0,0,0]}},"widgets_values":["DISPLACEMENT"]},{"id":219,"type":"processes/AssignScalarVariableToConditionsProcess","pos":[261,-65],"size":{"0":210,"1":102},"flags":{},"order":14,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":346},{"name":"interval","type":"process_array","link":344}],"outputs":[{"name":"Process","type":"process","links":[348]}],"properties":{"python_module":"assign_scalar_variable_to_conditions_process","kratos_module":"KratosMultiphysics","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.SurfacePressure3D_Pressure_on_surfaces_Auto2","variable_name":"POSITIVE_FACE_PRESSURE","value":"0","interval":[0,"End"]}},"widgets_values":["POSITIVE_FACE_PRESSURE","0"]}],"links":[[249,14,0,176,0,"material_array"],[250,176,0,177,0,"string"],[292,203,0,23,0,"process"],[304,23,0,206,6,"process_array"],[305,19,0,206,5,"process_array"],[306,204,0,206,4,"process_array"],[308,175,0,206,2,"process_array"],[310,4,0,206,0,"map"],[312,206,0,32,0,0],[313,206,0,45,0,0],[314,172,0,207,0,"map"],[315,177,0,207,1,"map"],[316,207,0,206,1,"map"],[321,208,0,14,0,"material"],[327,212,0,206,3,"process_array"],[331,149,0,208,0,"string"],[339,149,1,218,0,"string"],[340,197,0,218,1,"process_array"],[341,195,0,218,2,"process_array"],[342,186,0,218,3,"process_array"],[343,218,0,175,0,"process"],[344,214,0,219,1,"process_array"],[345,217,0,220,1,"process_array"],[346,149,2,219,0,"string"],[347,149,3,220,0,"string"],[348,219,0,212,0,"process"],[349,220,0,212,1,"process"]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file From 8f718821933d26be982361f39a58fcda9b6fdbaf Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Wed, 28 Jul 2021 16:40:15 +0200 Subject: [PATCH 36/45] No initializing the input filename --- js/nodes/solver_settings_aux_nodes/model_import_settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/nodes/solver_settings_aux_nodes/model_import_settings.js b/js/nodes/solver_settings_aux_nodes/model_import_settings.js index 47b6963..b92cb24 100644 --- a/js/nodes/solver_settings_aux_nodes/model_import_settings.js +++ b/js/nodes/solver_settings_aux_nodes/model_import_settings.js @@ -1,7 +1,7 @@ class ModelImportSettings { constructor() { - this.input_filename = this.addWidget("text", "Input filename", "Hyper_Reduced_Model_Part", function (v) { }, {}); + this.input_filename = this.addWidget("text", "Input filename", "", function(v){}, {}); this.input_type = this.addWidget("combo", "Input type", "mdpa", function (v) { }, { values: ["mdpa", "rest"] }); this.properties = { From 51f1d150dbbd54ef97dbca44f1eb234f0480952e Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Wed, 28 Jul 2021 16:40:38 +0200 Subject: [PATCH 37/45] No initializing module names --- js/nodes/processes/load_process_list_pressure.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/nodes/processes/load_process_list_pressure.js b/js/nodes/processes/load_process_list_pressure.js index f694db8..5f56585 100644 --- a/js/nodes/processes/load_process_list_pressure.js +++ b/js/nodes/processes/load_process_list_pressure.js @@ -6,6 +6,7 @@ function AssignScalarVariableToConditionsProcess() { this.properties = { "python_module" : "", "kratos_module" : "", + "process_name" : "", "Parameters" : { "model_part_name" : "", "variable_name" : "", From efdd6ef89b46b13bcb8730bc281f3ba39b7121d5 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Wed, 28 Jul 2021 16:41:03 +0200 Subject: [PATCH 38/45] A new force node --- js/nodes/processes/load_process_list.js | 63 +++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 js/nodes/processes/load_process_list.js diff --git a/js/nodes/processes/load_process_list.js b/js/nodes/processes/load_process_list.js new file mode 100644 index 0000000..417f571 --- /dev/null +++ b/js/nodes/processes/load_process_list.js @@ -0,0 +1,63 @@ + +function AssignVectorByDirectionToConditionProcess() { + this.addInput("model_part_name","string"); + this.addInput("interval","process_array"); + this.addInput("direction","process_array"); + + this.properties = { + "python_module" : "", + "kratos_module" : "", + "check" : "", + "process_name" : "", + "Parameters" : { + "model_part_name" : "", + "variable_name" : "", + "interval" : [], + "modulus" : 100000.0, + "direction" : [] + } + + }; + + var that = this; + this.variable_name = this.addWidget("text","VariableName", "LINE_LOAD", function(v){}, {} ); + this.modulus = this.addWidget("number","Modulus", 100000, function(v){}, {}); + + + this.addOutput("Process","process"); + + this.size = this.computeSize(); + this.serialize_widgets = true; + + } + + AssignVectorByDirectionToConditionProcess.title = "Load process list"; + AssignVectorByDirectionToConditionProcess.desc = "Node to specify a load process"; + + AssignVectorByDirectionToConditionProcess.prototype.onExecute = function() { + myoutput = this.properties + // model_part_name + if (this.getInputData(0) != undefined) { + myoutput["Parameters"]["model_part_name"] = this.getInputData(0) + } else { + myoutput["Parameters"]["model_part_name"] = this.properties["Parameters"]["model_part_name"] + } + // interval + if (this.getInputData(1) != undefined) { + myoutput["Parameters"]["interval"] = this.getInputData(1) + } else { + myoutput["Parameters"]["interval"] = this.properties["Parameters"]["interval"] + } + // direction + if (this.getInputData(2) != undefined) { + myoutput["Parameters"]["direction"] = this.getInputData(2) + } else { + myoutput["Parameters"]["direction"] = this.properties["Parameters"]["direction"] + } + myoutput["Parameters"]["variable_name"] = this.variable_name.value + myoutput["Parameters"]["modulus"] = this.modulus.value + + this.setOutputData(0, myoutput); + }; + + LiteGraph.registerNodeType("processes/AssignVectorByDirectionToConditionProcess", AssignVectorByDirectionToConditionProcess); \ No newline at end of file From dd021fd3020c2fe432cfa44b7a5146325075a2d6 Mon Sep 17 00:00:00 2001 From: WeiqSun97 Date: Wed, 28 Jul 2021 16:41:39 +0200 Subject: [PATCH 39/45] Add a new possible model part name --- js/nodes/output_processes/vtk_output_structural.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/nodes/output_processes/vtk_output_structural.js b/js/nodes/output_processes/vtk_output_structural.js index 6aa965e..fbf0f7f 100644 --- a/js/nodes/output_processes/vtk_output_structural.js +++ b/js/nodes/output_processes/vtk_output_structural.js @@ -27,7 +27,7 @@ function VTKStructural() { } } this.addOutput("Process", "process"); - this.model_part_name = this.addWidget("text","ModelPartName", "Structure.VISUALIZE_HROM", function(v){}, {} ); + this.model_part_name = this.addWidget("combo","ModelPartName", "Structure", function(v){}, {values:["Structure","Structure.VISUALIZE_HROM"]} ); this.size = this.computeSize(); } From 2f0b06a1b7b1f9acc8fc4cefba6c927b36d6d079 Mon Sep 17 00:00:00 2001 From: Raul Bravo Date: Wed, 13 Oct 2021 15:04:17 +0200 Subject: [PATCH 40/45] Erasing unused files --- examples/audio.json | 1 - examples/audio_delay.json | 1 - examples/audio_reverb.json | 1 - examples/benchmark.json | 1 - examples/features.json | 1 - examples/midi_generation.json | 1 - examples/subgraph.json | 1 - 7 files changed, 7 deletions(-) delete mode 100644 examples/audio.json delete mode 100644 examples/audio_delay.json delete mode 100644 examples/audio_reverb.json delete mode 100644 examples/benchmark.json delete mode 100644 examples/features.json delete mode 100644 examples/midi_generation.json delete mode 100644 examples/subgraph.json diff --git a/examples/audio.json b/examples/audio.json deleted file mode 100644 index 6945e8a..0000000 --- a/examples/audio.json +++ /dev/null @@ -1 +0,0 @@ -{"last_node_id":16,"last_link_id":16,"nodes":[{"id":9,"type":"widget/knob","pos":[440,81],"size":[80,100],"flags":{},"mode":0,"outputs":[{"name":"","type":"number","links":[8,9]}],"properties":{"min":0,"max":4,"value":0.24000000000000002,"wcolor":"#7AF","size":50},"boxcolor":"rgba(128,128,128,1.0)"},{"id":10,"type":"basic/watch","pos":[537,81],"size":{"0":140,"1":26},"flags":{},"mode":0,"inputs":[{"name":"value","type":0,"link":9,"label":"0.000"}],"outputs":[{"name":"value","type":0,"links":null,"label":""}],"properties":{"value":0.24000000000000002}},{"id":1,"type":"audio/destination","pos":[699,83],"size":{"0":140,"1":26},"flags":{},"mode":0,"inputs":[{"name":"in","type":"audio","link":1}],"properties":{}},{"id":6,"type":"widget/knob","pos":[116,179],"size":[80,100],"flags":{},"mode":0,"outputs":[{"name":"","type":"number","links":[5]}],"properties":{"min":0,"max":1,"value":0.5099999999999996,"wcolor":"#7AF","size":50},"boxcolor":"rgba(128,128,128,1.0)"},{"id":0,"type":"audio/source","pos":[272,192],"size":{"0":140,"1":86},"flags":{},"mode":0,"inputs":[{"name":"gain","type":"number","link":5},{"name":"Play","type":-1,"link":6},{"name":"Stop","type":-1,"link":7},{"name":"playbackRate","type":"number","link":8}],"outputs":[{"name":"out","type":"audio","links":[0]}],"properties":{"src":"demodata/audio.wav","gain":0.5,"loop":true,"autoplay":true,"playbackRate":0.24000000000000002},"boxcolor":"#AA4"},{"id":2,"type":"audio/biquadfilter","pos":[442,228],"size":{"0":140,"1":46},"flags":{},"mode":0,"inputs":[{"name":"in","type":"audio","link":0},{"name":"frequency","type":"number","link":4}],"outputs":[{"name":"out","type":"audio","links":[1,2]}],"properties":{"frequency":350,"detune":0,"Q":1,"type":"lowpass"}},{"id":3,"type":"audio/analyser","pos":[704,231],"size":{"0":140,"1":46},"flags":{},"mode":0,"inputs":[{"name":"in","type":"audio","link":2}],"outputs":[{"name":"freqs","type":"array","links":[3,10]},{"name":"samples","type":"array","links":null}],"properties":{"fftSize":2048,"minDecibels":-100,"maxDecibels":-10,"smoothingTimeConstant":0.5}},{"id":11,"type":"audio/signal","pos":[882,395],"size":{"0":140,"1":46},"flags":{},"mode":0,"inputs":[{"name":"freqs","type":"array","link":10},{"name":"band","type":"number","link":11}],"outputs":[{"name":"signal","type":"number","links":[12]}],"properties":{"band":440,"amplitude":1,"samplerate":44100}},{"id":4,"type":"audio/visualization","pos":[885,503],"size":{"0":140,"1":46},"flags":{},"mode":0,"inputs":[{"name":"freqs","type":"array","link":3},{"name":"mark","type":"number","link":13}],"properties":{"continuous":true,"mark":12000.000000000005,"samplerate":44100}},{"id":5,"type":"widget/knob","pos":[112,314],"size":[80,100],"flags":{},"mode":0,"outputs":[{"name":"","type":"number","links":[4]}],"properties":{"min":0,"max":20000,"value":14800.00000000001,"wcolor":"#7AF","size":50},"boxcolor":"rgba(128,128,128,1.0)"},{"id":13,"type":"basic/watch","pos":[110,458],"size":{"0":140,"1":26},"flags":{},"mode":0,"inputs":[{"name":"value","type":0,"link":12,"label":"0.000"}],"outputs":[{"name":"value","type":0,"links":[14],"label":""}],"title":"Max. Signal","properties":{"value":0.3843137254901945}},{"id":14,"type":"widget/progress","pos":[300,460],"size":{"0":140,"1":26},"flags":{},"mode":0,"inputs":[{"name":"","type":"number","link":14}],"properties":{"min":0,"max":1,"value":0.3843137254901945,"wcolor":"#AAF"}},{"id":12,"type":"widget/knob","pos":[460,458],"size":[80,100],"flags":{},"mode":0,"outputs":[{"name":"","type":"number","links":[11,13,15]}],"properties":{"min":0,"max":24000,"value":12000.000000000005,"wcolor":"#7AF","size":50},"boxcolor":"rgba(128,128,128,1.0)"},{"id":15,"type":"basic/watch","pos":[888,598],"size":{"0":140,"1":26},"flags":{},"mode":0,"inputs":[{"name":"value","type":0,"link":15,"label":"0.000"}],"outputs":[{"name":"value","type":0,"links":null,"label":""}],"properties":{"value":12000.000000000005}},{"id":7,"type":"widget/button","pos":[113,83],"size":{"0":141,"1":60},"flags":{},"mode":0,"outputs":[{"name":"clicked","type":-1,"links":[6]}],"properties":{"text":"Play","font_size":30,"message":"","font":"40px Arial"}},{"id":8,"type":"widget/button","pos":[273,83],"size":{"0":143,"1":62},"flags":{},"mode":0,"outputs":[{"name":"clicked","type":-1,"links":[7]}],"properties":{"text":"Stop","font_size":30,"message":"","font":"40px Arial"}}],"links":[[0,0,0,2,0,null],[1,2,0,1,0,null],[2,2,0,3,0,null],[3,3,0,4,0,null],[4,5,0,2,1,null],[5,6,0,0,0,null],[6,7,0,0,1,null],[7,8,0,0,2,null],[8,9,0,0,3,null],[9,9,0,10,0,null],[10,3,0,11,0,null],[11,12,0,11,1,null],[12,11,0,13,0,null],[13,12,0,4,1,null],[14,13,0,14,0,null],[15,12,0,15,0,null]],"groups":[],"config":{}} \ No newline at end of file diff --git a/examples/audio_delay.json b/examples/audio_delay.json deleted file mode 100644 index 1ba5c63..0000000 --- a/examples/audio_delay.json +++ /dev/null @@ -1 +0,0 @@ -{"iteration":27893,"last_node_id":7,"last_link_id":7,"links":{"0":{"id":0,"origin_id":0,"origin_slot":0,"target_id":1,"target_slot":0,"data":null},"1":{"id":1,"origin_id":0,"origin_slot":0,"target_id":2,"target_slot":0,"data":null},"2":{"id":2,"origin_id":2,"origin_slot":0,"target_id":1,"target_slot":2,"data":null},"3":{"id":3,"origin_id":1,"origin_slot":0,"target_id":3,"target_slot":0,"data":null},"4":{"id":4,"origin_id":4,"origin_slot":0,"target_id":1,"target_slot":1,"data":null},"5":{"id":5,"origin_id":5,"origin_slot":0,"target_id":1,"target_slot":3,"data":null},"6":{"id":6,"origin_id":6,"origin_slot":0,"target_id":2,"target_slot":1,"data":null}},"config":{},"nodes":[{"id":0,"title":"Source","type":"audio/source","pos":[195,187],"size":{"0":140,"1":20},"flags":{},"inputs":[{"name":"gain","type":"number","link":null}],"outputs":[{"name":"out","type":"audio","links":[0,1]}],"mode":0,"properties":{"src":"demodata/audio.wav","gain":0.5,"loop":true,"autoplay":true,"playbackRate":1}},{"id":1,"title":"Mixer","type":"audio/mixer","pos":[655,183],"size":{"0":140,"1":62},"flags":{},"inputs":[{"name":"in1","type":"audio","link":0},{"name":"in1 gain","type":"number","link":4},{"name":"in2","type":"audio","link":2},{"name":"in2 gain","type":"number","link":5}],"outputs":[{"name":"out","type":"audio","links":[3]}],"mode":0,"properties":{"gain1":0.5,"gain2":0.8}},{"id":3,"title":"Destination","type":"audio/destination","pos":[911,180],"size":{"0":140,"1":20},"flags":{},"inputs":[{"name":"in","type":"audio","link":3}],"mode":0,"properties":{}},{"id":4,"title":"Knob","type":"widget/knob","pos":[408,59],"size":[54,74],"flags":{},"outputs":[{"name":"","type":"number","links":[4]}],"mode":0,"properties":{"min":0,"max":1,"value":0.24000000000000007,"wcolor":"#7AF","size":50},"boxcolor":"rgba(128,128,128,1.0)"},{"id":5,"title":"Knob","type":"widget/knob","pos":[433,371],"size":[54,74],"flags":{},"outputs":[{"name":"","type":"number","links":[5]}],"mode":0,"properties":{"min":0,"max":1,"value":0.5199999999999996,"wcolor":"#7AF","size":50},"boxcolor":"rgba(128,128,128,1.0)"},{"id":2,"title":"Delay","type":"audio/delay","pos":[385,255],"size":{"0":142,"1":38},"flags":{},"inputs":[{"name":"in","type":"audio","link":1},{"name":"time","type":"number","link":6}],"outputs":[{"name":"out","type":"audio","links":[2]}],"mode":0,"properties":{"delayTime":0.5,"time":1}},{"id":6,"title":"Knob","type":"widget/knob","pos":[199,296],"size":[64,84],"flags":{},"outputs":[{"name":"","type":"number","links":[6]}],"mode":0,"properties":{"min":0,"max":2,"value":0.8799999999999999,"wcolor":"#7AF","size":50},"boxcolor":"rgba(112,112,112,1.0)"}]} \ No newline at end of file diff --git a/examples/audio_reverb.json b/examples/audio_reverb.json deleted file mode 100644 index 511a4d1..0000000 --- a/examples/audio_reverb.json +++ /dev/null @@ -1 +0,0 @@ -{"iteration":48488,"last_node_id":8,"last_link_id":9,"links":{"0":{"id":0,"origin_id":0,"origin_slot":0,"target_id":1,"target_slot":0,"data":null},"1":{"id":1,"origin_id":0,"origin_slot":0,"target_id":2,"target_slot":0,"data":null},"3":{"id":3,"origin_id":1,"origin_slot":0,"target_id":3,"target_slot":0,"data":null},"4":{"id":4,"origin_id":4,"origin_slot":0,"target_id":1,"target_slot":1,"data":null},"5":{"id":5,"origin_id":5,"origin_slot":0,"target_id":1,"target_slot":3,"data":null},"6":{"id":6,"origin_id":6,"origin_slot":0,"target_id":2,"target_slot":1,"data":null},"7":{"id":7,"origin_id":0,"origin_slot":0,"target_id":7,"target_slot":0,"data":null},"8":{"id":8,"origin_id":7,"origin_slot":0,"target_id":1,"target_slot":2,"data":null}},"config":{},"nodes":[{"id":1,"title":"Mixer","type":"audio/mixer","pos":[655,183],"size":{"0":140,"1":62},"flags":{},"inputs":[{"name":"in1","type":"audio","link":0},{"name":"in1 gain","type":"number","link":4},{"name":"in2","type":"audio","link":8},{"name":"in2 gain","type":"number","link":5}],"outputs":[{"name":"out","type":"audio","links":[3]}],"mode":0,"properties":{"gain1":0.5,"gain2":0.8}},{"id":3,"title":"Destination","type":"audio/destination","pos":[911,180],"size":{"0":140,"1":20},"flags":{},"inputs":[{"name":"in","type":"audio","link":3}],"mode":0,"properties":{}},{"id":0,"title":"Source","type":"audio/source","pos":[195,187],"size":{"0":140,"1":20},"flags":{},"inputs":[{"name":"gain","type":"number","link":null}],"outputs":[{"name":"out","type":"audio","links":[0,7]}],"mode":0,"properties":{"src":"demodata/audio.wav","gain":0.5,"loop":true,"autoplay":true,"playbackRate":1}},{"id":7,"title":"Convolver","type":"audio/convolver","pos":[421,253],"size":{"0":140,"1":20},"flags":{},"inputs":[{"name":"in","type":"audio","link":7}],"outputs":[{"name":"out","type":"audio","links":[8]}],"mode":0,"properties":{"impulse_src":"demodata/impulse.wav","normalize":true}},{"id":5,"title":"Reverb","type":"widget/knob","pos":[398,311],"size":[84,100],"flags":{},"outputs":[{"name":"","type":"number","links":[5]}],"mode":0,"properties":{"min":0,"max":1,"value":0.4099999999999999,"wcolor":"#7AF","size":50},"boxcolor":"rgba(128,128,128,1.0)"},{"id":4,"title":"Main","type":"widget/knob","pos":[408,59],"size":[81,93],"flags":{},"outputs":[{"name":"","type":"number","links":[4]}],"mode":0,"properties":{"min":0,"max":1,"value":0.21000000000000002,"wcolor":"#7AF","size":50},"boxcolor":"rgba(128,128,128,1.0)"}]} \ No newline at end of file diff --git a/examples/benchmark.json b/examples/benchmark.json deleted file mode 100644 index ad2094e..0000000 --- a/examples/benchmark.json +++ /dev/null @@ -1 +0,0 @@ -{"last_node_id":60,"last_link_id":50,"nodes":[{"id":9,"type":"features/slots","pos":[846,473],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":6}],"outputs":[{"name":"A","type":"number","links":null},{"name":"B","type":"number","links":null}],"properties":{}},{"id":8,"type":"features/slots","pos":[671,475],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":10}],"outputs":[{"name":"A","type":"number","links":null},{"name":"B","type":"number","links":null}],"properties":{}},{"id":18,"type":"features/slots","pos":[751.5619834710739,854.9586776859505],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":16}],"outputs":[{"name":"A","type":"number","links":[17,18]},{"name":"B","type":"number","links":[]}],"properties":{}},{"id":28,"type":"features/slots","pos":[1386.361032999997,389.62936599999995],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":23}],"outputs":[{"name":"A","type":"number","links":[24,25]},{"name":"B","type":"number","links":[]}],"properties":{}},{"id":35,"type":"features/shape","pos":[1555.6387189504107,741.7260602148749],"size":{"0":140,"1":39},"flags":{},"mode":0,"inputs":[{"name":"","type":"number","link":26}],"outputs":[{"name":"","type":"number","links":null}],"properties":{}},{"id":38,"type":"features/slots","pos":[1461.838718950411,987.9260602148759],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":28}],"outputs":[{"name":"A","type":"number","links":[29,30]},{"name":"B","type":"number","links":[]}],"properties":{}},{"id":39,"type":"features/slots","pos":[1376.8387189504106,1088.9260602148756],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":29}],"outputs":[{"name":"A","type":"number","links":null},{"name":"B","type":"number","links":null}],"properties":{}},{"id":40,"type":"features/slots","pos":[1551.838718950411,1086.9260602148754],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":30}],"outputs":[{"name":"A","type":"number","links":null},{"name":"B","type":"number","links":null}],"properties":{}},{"id":45,"type":"features/slots","pos":[588.5619834710739,1055.9586776859496],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":33}],"outputs":[{"name":"A","type":"number","links":null},{"name":"B","type":"number","links":null}],"properties":{}},{"id":46,"type":"features/slots","pos":[721.5619834710739,1058.9586776859496],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":34}],"outputs":[{"name":"A","type":"number","links":null},{"name":"B","type":"number","links":null}],"properties":{}},{"id":19,"type":"features/slots","pos":[666.5619834710739,955.9586776859505],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":17}],"outputs":[{"name":"A","type":"number","links":[33]},{"name":"B","type":"number","links":[34]}],"properties":{}},{"id":47,"type":"features/slots","pos":[846.5619834710739,1060.9586776859496],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":35}],"outputs":[{"name":"A","type":"number","links":null},{"name":"B","type":"number","links":null}],"properties":{}},{"id":48,"type":"features/slots","pos":[976.5619834710739,1059.9586776859496],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":36}],"outputs":[{"name":"A","type":"number","links":null},{"name":"B","type":"number","links":null}],"properties":{}},{"id":20,"type":"features/slots","pos":[841.5619834710739,953.9586776859505],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":18}],"outputs":[{"name":"A","type":"number","links":[35]},{"name":"B","type":"number","links":[36]}],"properties":{}},{"id":29,"type":"features/slots","pos":[1307,490],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":24}],"outputs":[{"name":"A","type":"number","links":[37]},{"name":"B","type":"number","links":[38]}],"properties":{}},{"id":30,"type":"features/slots","pos":[1476.3610329999974,488.62936599999995],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":25}],"outputs":[{"name":"A","type":"number","links":[39]},{"name":"B","type":"number","links":[40]}],"properties":{}},{"id":7,"type":"features/slots","pos":[756,374],"size":[100,40],"flags":{"horizontal":true,"collapsed":false},"mode":0,"inputs":[{"name":"C","type":"number","link":13}],"outputs":[{"name":"A","type":"number","links":[10]},{"name":"B","type":"number","links":[6]}],"properties":{}},{"id":34,"type":"features/widgets","pos":[1054,349],"size":{"0":189,"1":176},"flags":{"collapsed":false},"mode":0,"outputs":[{"name":"","type":"number","links":[23]}],"properties":{}},{"id":12,"type":"input/gamepad","pos":[607,204],"size":{"0":155,"1":69},"flags":{"collapsed":false},"mode":0,"outputs":[{"name":"left_x_axis","type":"number","links":null},{"name":"left_y_axis","type":"number","links":null},{"name":"button_pressed","type":-1,"links":[12]}],"properties":{"gamepad_index":0,"threshold":0.1}},{"id":4,"type":"math/operation","pos":[604,106],"size":[164,51],"flags":{"collapsed":false},"mode":0,"inputs":[{"name":"A","type":"number","link":2},{"name":"B","type":"number","link":9}],"outputs":[{"name":"=","type":"number","links":[1]}],"properties":{"A":2,"B":0.5,"OP":"+"},"shape":2},{"id":2,"type":"features/shape","pos":[867,112],"size":{"0":140,"1":39},"flags":{},"mode":0,"inputs":[{"name":"","type":"number","link":1}],"outputs":[{"name":"","type":"number","links":null}],"properties":{}},{"id":13,"type":"events/log","pos":[868,215],"size":{"0":143,"1":30},"flags":{},"mode":0,"inputs":[{"name":"event","type":-1,"link":12}],"properties":{}},{"id":14,"type":"features/widgets","pos":[432,357],"size":{"0":209,"1":178},"flags":{},"mode":0,"outputs":[{"name":"","type":"number","links":[13]}],"properties":{}},{"id":24,"type":"features/widgets","pos":[429,841],"size":{"0":184.9173583984375,"1":176.34710693359375},"flags":{},"mode":0,"outputs":[{"name":"","type":"number","links":[16]}],"properties":{}},{"id":44,"type":"features/widgets","pos":[1154,942],"size":{"0":191,"1":174},"flags":{},"mode":0,"outputs":[{"name":"","type":"number","links":[28]}],"properties":{}},{"id":36,"type":"math/operation","pos":[1333,729],"size":[144,45],"flags":{},"mode":0,"inputs":[{"name":"A","type":"number","link":27},{"name":"B","type":"number","link":null}],"outputs":[{"name":"=","type":"number","links":[26]}],"properties":{"A":2,"B":1,"OP":"+"},"shape":2},{"id":42,"type":"input/gamepad","pos":[1316,821],"size":{"0":182.3612823486328,"1":69.27394104003906},"flags":{"collapsed":false},"mode":0,"outputs":[{"name":"left_x_axis","type":"number","links":null},{"name":"left_y_axis","type":"number","links":null},{"name":"button_pressed","type":-1,"links":[]}],"properties":{"gamepad_index":0,"threshold":0.1}},{"id":43,"type":"events/log","pos":[1562,845],"size":{"0":142.16128540039062,"1":31.07394027709961},"flags":{},"mode":0,"inputs":[{"name":"event","type":-1,"link":null}],"properties":{}},{"id":41,"type":"widget/knob","pos":[1155,824],"size":[54,74],"flags":{},"mode":0,"outputs":[{"name":"","type":"number","links":[]}],"properties":{"min":0,"max":1,"value":0.5,"color":"#7AF","precision":2,"wcolor":"#7AF","size":50},"boxcolor":"rgba(128,128,128,1.0)"},{"id":37,"type":"math/operation","pos":[1138,739],"size":[148,44],"flags":{},"mode":0,"inputs":[{"name":"A","type":"number","link":null},{"name":"B","type":"number","link":null}],"outputs":[{"name":"=","type":"number","links":[27]}],"properties":{"A":1,"B":1,"OP":"+"},"color":"#233","bgcolor":"#355","shape":2},{"id":33,"type":"events/log","pos":[1493.3610329999974,224.629366],"size":{"0":147.6389617919922,"1":29.370634078979492},"flags":{},"mode":0,"inputs":[{"name":"event","type":-1,"link":32}],"properties":{}},{"id":26,"type":"math/operation","pos":[1268,128],"size":[144,50],"flags":{},"mode":0,"inputs":[{"name":"A","type":"number","link":22},{"name":"B","type":"number","link":31}],"outputs":[{"name":"=","type":"number","links":[21]}],"properties":{"A":2,"B":0.5,"OP":"+"},"shape":2},{"id":5,"type":"math/operation","pos":[437,114],"size":[140,48],"flags":{"collapsed":true},"mode":0,"inputs":[{"name":"A","type":"number","link":null},{"name":"B","type":"number","link":null}],"outputs":[{"name":"=","type":"number","links":[2]}],"properties":{"A":1,"B":1,"OP":"+"},"shape":2},{"id":27,"type":"math/operation","pos":[1061,129],"size":[144,44],"flags":{"collapsed":true},"mode":0,"inputs":[{"name":"A","type":"number","link":null},{"name":"B","type":"number","link":null}],"outputs":[{"name":"=","type":"number","links":[22]}],"properties":{"A":1,"B":1,"OP":"+"},"shape":2},{"id":49,"type":"features/slots","pos":[1210,589],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":37}],"outputs":[{"name":"A","type":"number","links":null},{"name":"B","type":"number","links":null}],"properties":{}},{"id":50,"type":"features/slots","pos":[1342,591],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":38}],"outputs":[{"name":"A","type":"number","links":null},{"name":"B","type":"number","links":null}],"properties":{}},{"id":51,"type":"features/slots","pos":[1471,590],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":39}],"outputs":[{"name":"A","type":"number","links":null},{"name":"B","type":"number","links":null}],"properties":{}},{"id":52,"type":"features/slots","pos":[1597,588],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":40}],"outputs":[{"name":"A","type":"number","links":null},{"name":"B","type":"number","links":null}],"properties":{}},{"id":25,"type":"features/shape","pos":[1500,116],"size":{"0":140,"1":39},"flags":{},"mode":0,"inputs":[{"name":"","type":"number","link":21}],"outputs":[{"name":"","type":"number","links":null}],"properties":{}},{"id":10,"type":"widget/knob","pos":[435,161],"size":[91,111],"flags":{},"mode":0,"outputs":[{"name":"","type":"number","links":[9]}],"properties":{"min":0,"max":1,"value":0.5,"color":"#7AF","precision":2,"wcolor":"#7AF","size":50},"boxcolor":"rgba(128,128,128,1.0)"},{"id":31,"type":"widget/knob","pos":[1058,182],"size":[95,114],"flags":{"collapsed":false},"mode":0,"outputs":[{"name":"","type":"number","links":[31]}],"properties":{"min":0,"max":1,"value":0.5,"color":"#7AF","precision":2,"wcolor":"#7AF","size":50},"boxcolor":"rgba(128,128,128,1.0)"},{"id":32,"type":"input/gamepad","pos":[1232,231],"size":{"0":191.6389617919922,"1":73.37063598632812},"flags":{"collapsed":false},"mode":0,"outputs":[{"name":"left_x_axis","type":"number","links":[46]},{"name":"left_y_axis","type":"number","links":[47]},{"name":"button_pressed","type":-1,"links":[32]}],"properties":{"gamepad_index":0,"threshold":0.1}},{"id":57,"type":"graphics/plot","pos":[1722,335],"size":{"0":140,"1":86},"flags":{},"mode":0,"inputs":[{"name":"A","type":"Number","link":48},{"name":"B","type":"Number","link":null},{"name":"C","type":"Number","link":null},{"name":"D","type":"Number","link":null}],"properties":{"scale":2}},{"id":21,"type":"widget/knob","pos":[435,591],"size":[72,90],"flags":{"collapsed":false},"mode":0,"outputs":[{"name":"","type":"number","links":[43]}],"properties":{"min":0,"max":1,"value":0.7297408895318863,"color":"#7AF","precision":2,"wcolor":"#7AF","size":50},"boxcolor":"rgba(186,186,186,1.0)"},{"id":16,"type":"math/operation","pos":[583,611],"size":[140,47],"flags":{"collapsed":false},"mode":0,"inputs":[{"name":"A","type":"number","link":43},{"name":"B","type":"number","link":45}],"outputs":[{"name":"=","type":"number","links":[44]}],"properties":{"A":0.7297408895318863,"B":5000,"OP":"*"},"shape":2},{"id":54,"type":"events/timer","pos":[764,620],"size":{"0":147,"1":30},"flags":{"collapsed":false},"mode":0,"inputs":[{"name":"interval","type":"number","link":44}],"outputs":[{"name":"on_tick","type":-1,"links":[42]}],"properties":{"interval":1000,"event":"tick"},"boxcolor":"#222","shape":2},{"id":23,"type":"events/log","pos":[961,622],"size":{"0":137,"1":28},"flags":{},"mode":0,"inputs":[{"name":"event","type":-1,"link":42}],"properties":{}},{"id":56,"type":"graph/subgraph","pos":[1543,336],"size":{"0":140,"1":86},"flags":{},"mode":0,"inputs":[{"name":"enabled","type":"boolean","link":49},{"name":"AxisX","type":0,"link":46},{"name":"AxisY","type":0,"link":47}],"outputs":[{"name":"sum","type":0,"links":[48]}],"properties":{"enabled":true},"subgraph":{"last_node_id":6,"last_link_id":4,"nodes":[{"id":4,"type":"graph/output","pos":[1655,311],"size":[180,60],"flags":{},"mode":0,"inputs":[{"name":"","type":0,"link":3}],"properties":{"name":"sum","type":0}},{"id":2,"type":"graph/input","pos":[1227,233],"size":[180,60],"flags":{},"mode":0,"outputs":[{"name":"","type":"","links":[1]}],"properties":{"name":"AxisX","type":""}},{"id":3,"type":"graph/input","pos":[1234,341],"size":[180,60],"flags":{},"mode":0,"outputs":[{"name":"","type":"","links":[2]}],"properties":{"name":"AxisY","type":""}},{"id":6,"type":"math/operation","pos":[1496,268],"size":[100,60],"flags":{},"mode":0,"inputs":[{"name":"A","type":"number","link":1},{"name":"B","type":"number","link":2}],"outputs":[{"name":"=","type":"number","links":[3]}],"properties":{"A":1,"B":1,"OP":"+"}}],"links":[[1,2,0,6,0,"number"],[2,3,0,6,1,"number"],[3,6,0,4,0,0]],"groups":[],"config":{},"version":0.4}},{"id":58,"type":"widget/toggle","pos":[1686,131],"size":[160,44],"flags":{},"mode":0,"inputs":[{"name":"","type":"boolean","link":null},{"name":"e","type":-1,"link":null}],"outputs":[{"name":"v","type":"boolean","links":[49]},{"name":"e","type":-1,"links":null}],"properties":{"font":"","value":true}},{"id":60,"type":"widget/number","pos":[626,706],"size":[74,54],"flags":{},"mode":0,"outputs":[{"name":"","type":"number","links":null}],"properties":{"min":-1000,"max":1000,"value":1,"step":1}},{"id":55,"type":"basic/const","pos":[422,738],"size":{"0":139,"1":28},"flags":{"collapsed":false},"mode":0,"outputs":[{"name":"value","type":"number","links":[45],"label":"5000.000"}],"properties":{"value":5000}}],"links":[[1,4,0,2,0,"number"],[2,5,0,4,0,"number"],[6,7,1,9,0,"number"],[9,10,0,4,1,"number"],[10,7,0,8,0,"number"],[12,12,2,13,0,-1],[13,14,0,7,0,"number"],[16,24,0,18,0,"number"],[17,18,0,19,0,"number"],[18,18,0,20,0,"number"],[21,26,0,25,0,"number"],[22,27,0,26,0,"number"],[23,34,0,28,0,"number"],[24,28,0,29,0,"number"],[25,28,0,30,0,"number"],[26,36,0,35,0,"number"],[27,37,0,36,0,"number"],[28,44,0,38,0,"number"],[29,38,0,39,0,"number"],[30,38,0,40,0,"number"],[31,31,0,26,1,"number"],[32,32,2,33,0,-1],[33,19,0,45,0,"number"],[34,19,1,46,0,"number"],[35,20,0,47,0,"number"],[36,20,1,48,0,"number"],[37,29,0,49,0,"number"],[38,29,1,50,0,"number"],[39,30,0,51,0,"number"],[40,30,1,52,0,"number"],[42,54,0,23,0,-1],[43,21,0,16,0,"number"],[44,16,0,54,0,"number"],[45,55,0,16,1,"number"],[46,32,0,56,1,0],[47,32,1,56,2,0],[48,56,0,57,0,"Number"],[49,58,0,56,0,"boolean"]],"groups":[{"title":"Group","bounding":[417,292,564,255],"color":"#3f789e"},{"title":"Group","bounding":[1120,678,642,461],"color":"#A88"},{"title":"Group","bounding":[411,777,679,361],"color":"#8A8"}],"config":{},"version":0.4} \ No newline at end of file diff --git a/examples/features.json b/examples/features.json deleted file mode 100644 index ead5a6d..0000000 --- a/examples/features.json +++ /dev/null @@ -1 +0,0 @@ -{"last_node_id":14,"last_link_id":14,"nodes":[{"id":9,"type":"features/slots","pos":[847,479],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":6}],"outputs":[{"name":"A","type":"number","links":null},{"name":"B","type":"number","links":null}],"properties":{}},{"id":7,"type":"features/slots","pos":[757,380],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":13}],"outputs":[{"name":"A","type":"number","links":[10]},{"name":"B","type":"number","links":[6]}],"properties":{}},{"id":8,"type":"features/slots","pos":[672,481],"size":[100,40],"flags":{"horizontal":true},"mode":0,"inputs":[{"name":"C","type":"number","link":10}],"outputs":[{"name":"A","type":"number","links":null},{"name":"B","type":"number","links":null}],"properties":{}},{"id":5,"type":"math/operation","pos":[413,101],"size":[140,34],"flags":{"collapsed":true},"mode":0,"inputs":[{"name":"A","type":"number","link":null},{"name":"B","type":"number","link":null}],"outputs":[{"name":"=","type":"number","links":[2]}],"properties":{"A":1,"B":1,"OP":"+"},"shape":2},{"id":12,"type":"input/gamepad","pos":[593,208],"size":{"0":175,"1":74},"flags":{},"mode":0,"outputs":[{"name":"left_x_axis","type":"number","links":null},{"name":"left_y_axis","type":"number","links":null},{"name":"button_pressed","type":-1,"links":[12]}],"properties":{"gamepad_index":0,"threshold":0.1}},{"id":13,"type":"events/log","pos":[862,246],"size":{"0":144,"1":32},"flags":{},"mode":0,"inputs":[{"name":"event","type":-1,"link":12}],"properties":{}},{"id":14,"type":"features/widgets","pos":[441,365],"size":{"0":180,"1":170},"flags":{},"mode":0,"outputs":[{"name":"","type":"number","links":[13]}],"properties":{}},{"id":10,"type":"widget/knob","pos":[421,197],"size":[74,92],"flags":{},"mode":0,"outputs":[{"name":"","type":"number","links":[9]}],"properties":{"min":0,"max":1,"value":0.5,"wcolor":"#7AF","size":50}},{"id":4,"type":"math/operation","pos":[596,116],"size":[148,48],"flags":{},"mode":0,"inputs":[{"name":"A","type":"number","link":2},{"name":"B","type":"number","link":9}],"outputs":[{"name":"=","type":"number","links":[1]}],"properties":{"A":1,"B":1,"OP":"+"},"shape":2},{"id":2,"type":"features/shape","pos":[850,97],"size":{"0":140,"1":39},"flags":{},"mode":0,"inputs":[{"name":"","type":"number","link":1}],"outputs":[{"name":"","type":"number","links":null}],"properties":{}}],"links":[[1,4,0,2,0,"number"],[2,5,0,4,0,"number"],[6,7,1,9,0,"number"],[9,10,0,4,1,"number"],[10,7,0,8,0,"number"],[12,12,2,13,0,-1],[13,14,0,7,0,"number"]],"groups":[{"title":"Group","bounding":[418,298,609,255],"color":"#3f789e"}],"config":{}} \ No newline at end of file diff --git a/examples/midi_generation.json b/examples/midi_generation.json deleted file mode 100644 index 960c59f..0000000 --- a/examples/midi_generation.json +++ /dev/null @@ -1 +0,0 @@ -{"last_node_id":47,"last_link_id":64,"nodes":[{"id":8,"type":"midi/generator","pos":[548,390],"size":{"0":140,"1":66},"flags":{},"mode":0,"inputs":[{"name":"generate","type":-1,"link":11},{"name":"scale","type":"string","link":47},{"name":"octave","type":"number","link":null}],"outputs":[{"name":"note","type":-1,"links":[10,19]}],"properties":{"notes":"A,B,C","octave":2,"duration":0.5,"mode":"sequence"}},{"id":20,"type":"midi/transpose","pos":[726,489],"size":{"0":140,"1":46},"flags":{},"mode":0,"inputs":[{"name":"in","type":-1,"link":19},{"name":"amount","type":"number","link":null}],"outputs":[{"name":"out","type":-1,"links":[21]}],"properties":{"amount":5}},{"id":32,"type":"midi/event","pos":[1465,656],"size":{"0":140,"1":46},"flags":{},"mode":0,"inputs":[{"name":"send","type":-1,"link":null},{"name":"assign","type":-1,"link":44}],"outputs":[{"name":"on_midi","type":-1,"links":null},{"name":"note","type":"number","links":[45]}],"properties":{"channel":0,"cmd":128,"value1":0,"value2":0}},{"id":19,"type":"midi/play","pos":[1132,611],"size":{"0":140,"1":66},"flags":{},"mode":0,"inputs":[{"name":"note","type":-1,"link":53},{"name":"volume","type":"number","link":36},{"name":"duration","type":"number","link":null}],"outputs":[{"name":"note","type":-1,"links":[35,44]}],"properties":{"volume":0.3599999999999999,"duration":4,"value":0}},{"id":21,"type":"midi/quantize","pos":[903,589],"size":{"0":159.60000610351562,"1":46},"flags":{},"mode":0,"inputs":[{"name":"note","type":-1,"link":21},{"name":"scale","type":"string","link":49}],"outputs":[{"name":"out","type":-1,"links":[53]}],"properties":{"scale":"A,A#,B,C,C#,D,D#,E,F,F#,G,G#","amount":"A,B,C,D,E,F,G"}},{"id":37,"type":"basic/watch","pos":[547,615],"size":{"0":140,"1":26},"flags":{},"mode":0,"inputs":[{"name":"value","type":0,"link":52,"label":"A,B,C,B"}],"properties":{}},{"id":35,"type":"basic/string","pos":[79,456],"size":[210,58],"flags":{},"mode":0,"outputs":[{"name":"value","type":"string","links":[50],"label":"A,B,C"}],"title":"NOTE SCALE","properties":{"value":"A,B,C,B"}},{"id":7,"type":"midi/generator","pos":[549,289],"size":{"0":140,"1":66},"flags":{},"mode":0,"inputs":[{"name":"generate","type":-1,"link":5},{"name":"scale","type":"string","link":48},{"name":"octave","type":"number","link":null}],"outputs":[{"name":"note","type":-1,"links":[7,12]}],"properties":{"notes":"A,B,C","octave":2,"duration":0.5,"mode":"random"}},{"id":41,"type":"midi/generator","pos":[552,189],"size":{"0":140,"1":66},"flags":{},"mode":0,"inputs":[{"name":"generate","type":-1,"link":57},{"name":"scale","type":"string","link":55},{"name":"octave","type":"number","link":null}],"outputs":[{"name":"note","type":-1,"links":[62]}],"properties":{"notes":"A,B,C","octave":3,"duration":0.5,"mode":"sequence"}},{"id":12,"type":"events/timer","pos":[180,284],"size":{"0":140,"1":26},"flags":{},"mode":0,"inputs":[{"name":"interval","type":"number","link":null}],"outputs":[{"name":"on_tick","type":-1,"links":[11]}],"properties":{"interval":1200,"event":"tick"},"boxcolor":"#222"},{"id":34,"type":"logic/selector","pos":[351,468],"size":{"0":140,"1":106},"flags":{},"mode":0,"inputs":[{"name":"sel","type":"number","link":58},{"name":"A","type":0,"link":46},{"name":"B","type":0,"link":50},{"name":"C","type":0,"link":59},{"name":"D","type":0,"link":null}],"outputs":[{"name":"out","links":[47,48,49,52,55]}],"properties":{}},{"id":47,"type":"midi/keys","pos":[1153,88],"size":[423,104],"flags":{},"mode":0,"inputs":[{"name":"note","type":-1,"link":62},{"name":"reset","type":-1,"link":null}],"outputs":[{"name":"note","type":-1,"links":[63]}],"properties":{"num_octaves":2,"start_octave":3}},{"id":15,"type":"math/floor","pos":[505,85],"size":[140,26],"flags":{"collapsed":true},"mode":0,"inputs":[{"name":"in","type":"number","link":14}],"outputs":[{"name":"out","type":"number","links":[15]}],"properties":{}},{"id":14,"type":"math/rand","pos":[344,83],"size":[140,26],"flags":{"collapsed":true},"mode":0,"outputs":[{"name":"value","type":"number","links":[14],"label":"1.191"}],"properties":{"min":-1,"max":2}},{"id":16,"type":"math/operation","pos":[645,85],"size":[100,50],"flags":{"collapsed":true},"mode":0,"inputs":[{"name":"A","type":"number","link":15},{"name":"B","type":"number","link":null}],"outputs":[{"name":"=","type":"number","links":[16]}],"properties":{"A":1,"B":12,"OP":"*"}},{"id":10,"type":"basic/string","pos":[77,360],"size":[208,48],"flags":{},"mode":0,"outputs":[{"name":"value","type":"string","links":[46],"label":"A,B,C"}],"title":"NOTE SCALE","properties":{"value":"A,B,C,D,E,F,G"}},{"id":43,"type":"basic/string","pos":[79,556],"size":[210,58],"flags":{},"mode":0,"outputs":[{"name":"value","type":"string","links":[59],"label":"A,B,C"}],"title":"NOTE SCALE","properties":{"value":"D,E,F,G,F,E"}},{"id":44,"type":"math/rand","pos":[143,664],"size":[140,26],"flags":{},"mode":0,"outputs":[{"name":"value","type":"number","links":[58],"label":"0.750"}],"properties":{"min":0,"max":1}},{"id":11,"type":"midi/play","pos":[1135,496],"size":{"0":140,"1":66},"flags":{},"mode":0,"inputs":[{"name":"note","type":-1,"link":10},{"name":"volume","type":"number","link":18},{"name":"duration","type":"number","link":null}],"outputs":[{"name":"note","type":-1,"links":[34,43]}],"properties":{"volume":0.3599999999999999,"duration":4,"value":0}},{"id":13,"type":"midi/transpose","pos":[893,258],"size":{"0":140,"1":46},"flags":{},"mode":0,"inputs":[{"name":"in","type":-1,"link":12},{"name":"amount","type":"number","link":16}],"outputs":[{"name":"out","type":-1,"links":[54]}],"properties":{"amount":12}},{"id":4,"type":"midi/play","pos":[1155,249],"size":{"0":140,"1":66},"flags":{},"mode":0,"inputs":[{"name":"note","type":-1,"link":54},{"name":"volume","type":"number","link":17},{"name":"duration","type":"number","link":null}],"outputs":[{"name":"note","type":-1,"links":[33,39]}],"properties":{"volume":0.21000000000000005,"duration":1,"value":0}},{"id":30,"type":"midi/event","pos":[1433,260],"size":{"0":140,"1":46},"flags":{},"mode":0,"inputs":[{"name":"send","type":-1,"link":null},{"name":"assign","type":-1,"link":39}],"outputs":[{"name":"on_midi","type":-1,"links":null},{"name":"note","type":"number","links":[38]}],"properties":{"channel":0,"cmd":128,"value1":57,"value2":0}},{"id":28,"type":"midi/output","pos":[1428,414],"size":{"0":140,"1":66},"flags":{},"mode":0,"inputs":[{"name":"send","type":-1,"link":33},{"name":"send","type":-1,"link":34},{"name":"send","type":-1,"link":35}],"properties":{"port":0}},{"id":31,"type":"midi/event","pos":[1469,563],"size":{"0":140,"1":46},"flags":{},"mode":0,"inputs":[{"name":"send","type":-1,"link":null},{"name":"assign","type":-1,"link":43}],"outputs":[{"name":"on_midi","type":-1,"links":null},{"name":"note","type":"number","links":[42]}],"properties":{"channel":0,"cmd":128,"value1":50,"value2":0}},{"id":29,"type":"graphics/plot","pos":[1675,328],"size":{"0":348,"1":139},"flags":{},"mode":0,"inputs":[{"name":"A","type":"Number","link":38},{"name":"B","type":"Number","link":42},{"name":"C","type":"Number","link":45},{"name":"D","type":"Number","link":null}],"properties":{"scale":100}},{"id":46,"type":"math/rand","pos":[1455,42],"size":[140,26],"flags":{"collapsed":true},"mode":0,"outputs":[{"name":"value","type":"number","links":[60],"label":"0.007"}],"properties":{"min":0,"max":0.2}},{"id":39,"type":"midi/play","pos":[1656,116],"size":{"0":140,"1":66},"flags":{},"mode":0,"inputs":[{"name":"note","type":-1,"link":63},{"name":"volume","type":"number","link":60},{"name":"duration","type":"number","link":null}],"outputs":[{"name":"note","type":-1,"links":[]}],"properties":{"volume":0.006812153971126511,"duration":1,"value":0}},{"id":3,"type":"events/timer","pos":[178,212],"size":{"0":140,"1":26},"flags":{},"mode":0,"inputs":[{"name":"interval","type":"number","link":null}],"outputs":[{"name":"on_tick","type":-1,"links":[5,57]}],"properties":{"interval":300,"event":"tick"},"boxcolor":"#222"},{"id":18,"type":"widget/knob","pos":[819,62],"size":[82.78512396694214,93.87603305785123],"flags":{},"mode":0,"outputs":[{"name":"","type":"number","links":[18,36]}],"properties":{"min":0,"max":1,"value":0.4504132231404958,"wcolor":"#7AF","size":50},"boxcolor":"rgba(128,128,128,1.0)"},{"id":17,"type":"widget/knob","pos":[916,62],"size":[78.34710743801656,94.70247933884298],"flags":{"collapsed":false},"mode":0,"outputs":[{"name":"","type":"number","links":[17]}],"properties":{"min":0,"max":1,"value":0.21000000000000005,"wcolor":"#7AF","size":50},"boxcolor":"rgba(128,128,128,1.0)"},{"id":6,"type":"midi/show","pos":[898,357],"size":[266.5950413223138,61.685950413223],"flags":{},"mode":0,"inputs":[{"name":"on_midi","type":-1,"link":7}],"properties":{}}],"links":[[5,3,0,7,0,-1],[7,7,0,6,0,-1],[10,8,0,11,0,-1],[11,12,0,8,0,-1],[12,7,0,13,0,-1],[14,14,0,15,0,"number"],[15,15,0,16,0,"number"],[16,16,0,13,1,"number"],[17,17,0,4,1,"number"],[18,18,0,11,1,"number"],[19,8,0,20,0,-1],[21,20,0,21,0,-1],[33,4,0,28,0,-1],[34,11,0,28,1,-1],[35,19,0,28,2,-1],[36,18,0,19,1,"number"],[38,30,1,29,0,"Number"],[39,4,0,30,1,-1],[42,31,1,29,1,"Number"],[43,11,0,31,1,-1],[44,19,0,32,1,-1],[45,32,1,29,2,"Number"],[46,10,0,34,1,0],[47,34,0,8,1,"string"],[48,34,0,7,1,"string"],[49,34,0,21,1,"string"],[50,35,0,34,2,0],[52,34,0,37,0,0],[53,21,0,19,0,-1],[54,13,0,4,0,-1],[55,34,0,41,1,"string"],[57,3,0,41,0,-1],[58,44,0,34,0,"number"],[59,43,0,34,3,0],[60,46,0,39,1,"number"],[62,41,0,47,0,-1],[63,47,0,39,0,-1]],"groups":[],"config":{}} \ No newline at end of file diff --git a/examples/subgraph.json b/examples/subgraph.json deleted file mode 100644 index 27c1347..0000000 --- a/examples/subgraph.json +++ /dev/null @@ -1 +0,0 @@ -{"last_node_id":6,"last_link_id":5,"nodes":[{"id":3,"type":"basic/time","pos":[312,145],"size":{"0":140,"1":46},"flags":{},"mode":0,"outputs":[{"name":"in ms","type":"number","links":null},{"name":"in sec","type":"number","links":[1]}],"properties":{}},{"id":4,"type":"basic/watch","pos":[864,156],"size":{"0":140,"1":26},"flags":{},"mode":0,"inputs":[{"name":"value","type":0,"link":2,"label":"5.000"}],"properties":{}},{"id":6,"type":"events/counter","pos":[864,229],"size":{"0":140,"1":66},"flags":{},"mode":0,"inputs":[{"name":"inc","type":-1,"link":4},{"name":"dec","type":-1,"link":null},{"name":"reset","type":-1,"link":null}],"outputs":[{"name":"change","type":-1,"links":null},{"name":"num","type":"number","links":null}],"properties":{}},{"id":2,"type":"graph/subgraph","pos":[573,168],"size":{"0":140,"1":86},"flags":{},"mode":0,"inputs":[{"name":"enabled","type":"boolean","link":null},{"name":"foo","type":"","link":1},{"name":"EV","type":-1,"link":3}],"outputs":[{"name":"faa","type":0,"links":[2]},{"name":"EV","type":-1,"links":[4]}],"properties":{"enabled":true},"subgraph":{"last_node_id":7,"last_link_id":6,"nodes":[{"id":3,"type":"graph/output","pos":[1119,139],"size":[180,60],"flags":{},"mode":0,"inputs":[{"name":"","type":0,"link":2}],"properties":{"name":"faa","type":0}},{"id":4,"type":"math/floor","pos":[872,194],"size":[112,28],"flags":{},"mode":0,"inputs":[{"name":"in","type":"number","link":1}],"outputs":[{"name":"out","type":"number","links":[2]}],"properties":{}},{"id":2,"type":"graph/input","pos":[440,149],"size":[180,60],"flags":{},"mode":0,"outputs":[{"name":"","type":"","links":[1]}],"properties":{"name":"foo","type":""}},{"id":5,"type":"graph/input","pos":[460,282],"size":[180,60],"flags":{},"mode":0,"outputs":[{"name":"","type":-1,"links":[4]}],"properties":{"name":"EV","type":-1}},{"id":6,"type":"graph/output","pos":[1054,293],"size":[180,60],"flags":{},"mode":0,"inputs":[{"name":"","type":-1,"link":5}],"properties":{"name":"EV","type":-1}},{"id":7,"type":"events/delay","pos":[742,300],"size":{"0":140,"1":26},"flags":{},"mode":0,"inputs":[{"name":"event","type":-1,"link":4}],"outputs":[{"name":"on_time","type":-1,"links":[5]}],"properties":{"time_in_ms":1000}}],"links":[[1,2,0,4,0,"number"],[2,4,0,3,0,0],[4,5,0,7,0,-1],[5,7,0,6,0,-1]],"groups":[],"config":{},"version":0.4}},{"id":5,"type":"events/timer","pos":[311,240],"size":{"0":140,"1":26},"flags":{},"mode":0,"outputs":[{"name":"on_tick","type":-1,"links":[3]}],"properties":{"interval":2000,"event":"tick"},"boxcolor":"#222"}],"links":[[1,3,1,2,1,0],[2,2,0,4,0,0],[3,5,0,2,2,-1],[4,2,1,6,0,-1]],"groups":[],"config":{},"version":0.4} \ No newline at end of file From d0086ef0bf0465cb8178db1832ec9ad152216ff7 Mon Sep 17 00:00:00 2001 From: Raul Bravo Date: Wed, 13 Oct 2021 15:15:44 +0200 Subject: [PATCH 41/45] Add an extra output from the Parsed Model Part: the file name. --- js/nodes/parsed_model_part.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/js/nodes/parsed_model_part.js b/js/nodes/parsed_model_part.js index ba28e1a..4d198cc 100644 --- a/js/nodes/parsed_model_part.js +++ b/js/nodes/parsed_model_part.js @@ -8,7 +8,7 @@ class ParsedModelPart { this.mp_select = this.addWidget("button", "Load Mdpa", "", function (value, widget, node) { node.input_manager.click(); }); - + this.file_name = "dummy_name" this.properties = { "submodelpart_list" : [] }; @@ -18,9 +18,10 @@ class ParsedModelPart { } onExecute() { - for (let i = 0; i < this.outputs.length; ++i) { + for (let i = 0; i < this.outputs.length -1; ++i) { this.setOutputData(i, this.mp_name.value+this.outputs[i].name); } + this.setOutputData(this.outputs.length-1, this.file_name); } onSelection(e) { @@ -50,6 +51,7 @@ class ParsedModelPart { // Obtain the name of the ModelPart to get complete routes let sub_mdpa_namepath = "" this.mp_name.value = file.name.slice(0, -5); + this.file_name = this.mp_name.value; // Obtain the Submodelparts this.addOutput(sub_mdpa_namepath, "string"); @@ -61,8 +63,8 @@ class ParsedModelPart { if (match[0].includes("End")) { sub_mdpa_namepath = sub_mdpa_namepath.split("."); - sub_mdpa_namepath.pop(); - sub_mdpa_namepath = sub_mdpa_namepath.join("."); + sub_mdpa_namepath.pop(); // I think this is doing nothing + sub_mdpa_namepath = sub_mdpa_namepath.join("."); // I think this is doing nothing } } @@ -77,6 +79,7 @@ class ParsedModelPart { this.updateProblemModelParts(); this.updateModelNodes(); + this.addOutput("File Name", "string") } } From 71a142bb64bd0c1c1bfb43b45cd6246a246efe79 Mon Sep 17 00:00:00 2001 From: Raul Bravo Date: Wed, 13 Oct 2021 15:17:46 +0200 Subject: [PATCH 42/45] Accept the file name as an input to the model import settings box --- js/nodes/solver_settings_aux_nodes/model_import_settings.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/nodes/solver_settings_aux_nodes/model_import_settings.js b/js/nodes/solver_settings_aux_nodes/model_import_settings.js index b92cb24..bd5b81f 100644 --- a/js/nodes/solver_settings_aux_nodes/model_import_settings.js +++ b/js/nodes/solver_settings_aux_nodes/model_import_settings.js @@ -1,7 +1,8 @@ class ModelImportSettings { constructor() { - this.input_filename = this.addWidget("text", "Input filename", "", function(v){}, {}); + //this.input_filename = this.addWidget("text", "Input filename", "", function(v){}, {}); + this.addInput("Input filename", "string"); this.input_type = this.addWidget("combo", "Input type", "mdpa", function (v) { }, { values: ["mdpa", "rest"] }); this.properties = { @@ -16,7 +17,7 @@ class ModelImportSettings { onExecute() { this._value = Object.assign({}, this.properties); - this._value["input_filename"] = this.input_filename.value; + this._value["input_filename"] = this.getInputData(0); this._value["input_type"] = this.input_type.value; this.setOutputData(0, this._value); From 47c6d855cba400be08bdfa364df0ad61477f6c3e Mon Sep 17 00:00:00 2001 From: Raul Bravo Date: Wed, 13 Oct 2021 18:55:16 +0200 Subject: [PATCH 43/45] adding default values in processes --- js/nodes/processes/constraints_process_list.js | 12 ++++++------ js/nodes/processes/load_process_list.js | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/js/nodes/processes/constraints_process_list.js b/js/nodes/processes/constraints_process_list.js index 50c464e..9d803d1 100644 --- a/js/nodes/processes/constraints_process_list.js +++ b/js/nodes/processes/constraints_process_list.js @@ -5,10 +5,10 @@ function AssignVectorVariableProcess () { this.addInput("value","process_array") this.properties = { - - "python_module" : "", - "kratos_module" : "", - "process_name" : "", + + "python_module" : "assign_vector_variable_process", + "kratos_module" : "KratosMultiphysics", + "process_name" : "AssignVectorVariableProcess", "Parameters" : { "model_part_name" : "", "variable_name" : "", @@ -25,7 +25,7 @@ function AssignVectorVariableProcess () { this.size = this.computeSize(); this.serialize_widgets = true; - + } @@ -61,7 +61,7 @@ myoutput = this.properties myoutput["Parameters"]["value"] = this.properties["Parameters"]["value"] } - + myoutput["Parameters"]["variable_name"] = this.variable_name.value this.setOutputData(0, myoutput); diff --git a/js/nodes/processes/load_process_list.js b/js/nodes/processes/load_process_list.js index 417f571..2b688d3 100644 --- a/js/nodes/processes/load_process_list.js +++ b/js/nodes/processes/load_process_list.js @@ -5,10 +5,10 @@ function AssignVectorByDirectionToConditionProcess() { this.addInput("direction","process_array"); this.properties = { - "python_module" : "", - "kratos_module" : "", - "check" : "", - "process_name" : "", + "python_module" : "assign_vector_by_direction_to_condition_process", + "kratos_module" : "KratosMultiphysics", + "check" : "DirectorVectorNonZero direction", + "process_name" : "AssignVectorByDirectionToConditionProcess", "Parameters" : { "model_part_name" : "", "variable_name" : "", @@ -16,7 +16,7 @@ function AssignVectorByDirectionToConditionProcess() { "modulus" : 100000.0, "direction" : [] } - + }; var that = this; From 2eb96f40da0045a87892a2e4d23dd58cc6d1a6b2 Mon Sep 17 00:00:00 2001 From: Raul Bravo Date: Thu, 14 Oct 2021 11:47:03 +0200 Subject: [PATCH 44/45] Erasing some examples that still need more work --- resources/examples/StructuralMechanics_HROM.json | 1 - resources/examples/Test.json.json | 1 - 2 files changed, 2 deletions(-) delete mode 100644 resources/examples/StructuralMechanics_HROM.json delete mode 100644 resources/examples/Test.json.json diff --git a/resources/examples/StructuralMechanics_HROM.json b/resources/examples/StructuralMechanics_HROM.json deleted file mode 100644 index 88003f2..0000000 --- a/resources/examples/StructuralMechanics_HROM.json +++ /dev/null @@ -1 +0,0 @@ -{"last_node_id":220,"last_link_id":349,"nodes":[{"id":206,"type":"parameters/StructuralProjectParameters","pos":[1008,-130],"size":{"0":362.79998779296875,"1":146},"flags":{},"order":22,"mode":0,"inputs":[{"name":"problem_data","type":"map","link":310},{"name":"solver_settings","type":"map","link":316},{"name":"constraints_process_list","type":"process_array","link":308},{"name":"loads_process_list","type":"process_array","link":327},{"name":"list_other_processes","type":"process_array","link":306},{"name":"gid_output","type":"process_array","link":305},{"name":"vtk_output","type":"process_array","link":304}],"outputs":[{"name":"project_parameters","type":"map","links":[312,313]}],"properties":{}},{"id":177,"type":"solver_settings_aux_nodes/MaterialImportSettings","pos":[123,-373],"size":{"0":287.20001220703125,"1":26},"flags":{},"order":20,"mode":0,"inputs":[{"name":"Materials filename","type":"string","link":250}],"outputs":[{"name":"solver_settings","type":"map","links":[315]}],"properties":{"materials_filename":""}},{"id":14,"type":"materials/materials_list","pos":[-323,-428],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":16,"mode":0,"inputs":[{"name":"In0","type":"material","link":321},{"name":"In1","type":"material","link":null}],"outputs":[{"name":"array","type":"material_array","links":[249]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":176,"type":"materials/Material Writer","pos":[-147,-423],"size":{"0":210,"1":58},"flags":{},"order":19,"mode":0,"inputs":[{"name":"Material List","type":"material_array","link":249}],"outputs":[{"name":"Material","type":"string","links":[250]}],"properties":{}},{"id":19,"type":"processes/list","pos":[631,213],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":0,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[305]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":204,"type":"processes/list","pos":[670,81],"size":{"0":140,"1":46},"flags":{},"order":1,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[306]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":208,"type":"materials/StructuralMaterial","pos":[-563,-431],"size":{"0":210,"1":174},"flags":{},"order":12,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":331},{"name":"tables","type":"process_array","link":null}],"outputs":[{"name":"Material","type":"material","links":[321]}],"properties":{"model_part_name":"Structure.Parts_Solid_Solid_Auto1","properties_id":1,"Material":{"constitutive_law":{"name":"LinearElasticPlaneStress2DLaw"},"Variables":{"DENSITY":7850,"YOUNG_MODULUS":206900000000,"POISSON_RATIO":0.29,"THICKNESS":0.1},"Tables":{}}}},{"id":23,"type":"processes/list","pos":[611,309],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":11,"mode":0,"inputs":[{"name":"In0","type":"process","link":292},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[304]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":4,"type":"parameters/ProblemData","pos":[558,-298],"size":{"0":140,"1":86},"flags":{"collapsed":false},"order":2,"mode":0,"outputs":[{"name":"problem_data","type":"map","links":[310]},{"name":"problem_name","type":"string","links":null},{"name":"start_time","type":"number","links":null},{"name":"end_time","type":"number","links":null}],"properties":{"problem_name":"Wing4","parallel_type":"OpenMP","echo_level":1,"start_time":0,"end_time":30}},{"id":203,"type":"output_processes/VTK_structural","pos":[372,292],"size":{"0":210,"1":58},"flags":{"collapsed":false},"order":3,"mode":0,"outputs":[{"name":"Process","type":"process","links":[292]}],"properties":{"python_module":"vtk_output_process","kratos_module":"KratosMultiphysics","process_name":"VtkOutputProcess","help":"This process writes postprocessing files for Paraview","Parameters":{"model_part_name":"Structure.VISUALIZE_HROM","output_control_type":"step","output_interval":1,"file_format":"ascii","output_precision":7,"output_sub_model_parts":false,"folder_name":"vtk_output","save_output_files_in_folder":true,"nodal_solution_step_data_variables":["DISPLACEMENT","REACTION"],"nodal_data_value_variables":[],"element_data_value_variables":[],"condition_data_value_variables":[],"gauss_point_variables_extrapolated_to_nodes":["VON_MISES_STRESS"]}}},{"id":207,"type":"solver_settings/StructuralMechanicsSolver","pos":[439,-460],"size":{"0":337.6000061035156,"1":78},"flags":{},"order":21,"mode":0,"inputs":[{"name":"model_import_settings","type":"map","link":314},{"name":"material_import_settings","type":"map","link":315}],"outputs":[{"name":"solver_settings","type":"map","links":[316]}],"properties":{"solver_type":"Static","model_part_name":"Structure","domain_size":3,"echo_level":0,"analysis_type":"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,"volumetric_strain_dofs":false,"problem_domain_sub_model_part_list":["COMPUTE_HROM, VISUALIZE_HROM"],"processes_sub_model_part_list":["COMPUTE_HROM, VISUALIZE_HROM"]}},{"id":172,"type":"solver_settings_aux_nodes/ModelImportSettings","pos":[152,-505],"size":{"0":210,"1":82},"flags":{},"order":4,"mode":0,"outputs":[{"name":"solver_settings","type":"map","links":[314]}],"properties":{"input_filename":""}},{"id":32,"type":"basic/DownloadProblem","pos":[1431,-198],"size":{"0":210,"1":78},"flags":{"collapsed":false},"order":23,"mode":0,"inputs":[{"name":"data","type":0,"link":312},{"name":"download","type":-1,"link":null}],"properties":{"filename":"data.json"}},{"id":197,"type":"processes/interval","pos":[-418,-114],"size":{"0":210,"1":82},"flags":{},"order":5,"mode":0,"outputs":[{"name":"","type":"process_array","links":[340]}],"properties":{}},{"id":195,"type":"processes/BooleanList","pos":[-419,17],"size":{"0":210,"1":106},"flags":{},"order":6,"mode":0,"outputs":[{"name":"","type":"process_array","links":[341]}],"properties":{}},{"id":186,"type":"processes/Vector","pos":[-421,164],"size":{"0":210,"1":106},"flags":{},"order":7,"mode":0,"outputs":[{"name":"","type":"process_array","links":[342]}],"properties":{}},{"id":214,"type":"processes/interval","pos":[-38,-2],"size":{"0":210,"1":82},"flags":{},"order":8,"mode":0,"outputs":[{"name":"","type":"process_array","links":[344]}],"properties":{}},{"id":149,"type":"model_part/ParsedModelPart","pos":[-1041,-242],"size":{"0":388,"1":142},"flags":{},"order":9,"mode":0,"outputs":[{"name":".Parts_Solid_Solid_Auto1","type":"string","links":[331]},{"name":".DISPLACEMENT_Displacement_Auto1","type":"string","links":[339]},{"name":".SurfacePressure3D_Pressure_on_surfaces_Auto2","type":"string","links":[346]},{"name":".SurfacePressure3D_Pressure_on_surfaces_Auto3","type":"string","links":[347]}],"properties":{"submodelpart_list":[".Parts_Solid_Solid_Auto1",".DISPLACEMENT_Displacement_Auto1",".SurfacePressure3D_Pressure_on_surfaces_Auto2",".SurfacePressure3D_Pressure_on_surfaces_Auto3"]},"widgets_values":["Structure.COMPUTE_HROM",""]},{"id":212,"type":"processes/list","pos":[539,-11],"size":{"0":140,"1":66},"flags":{},"order":18,"mode":0,"inputs":[{"name":"In0","type":"process","link":348},{"name":"In1","type":"process","link":349},{"name":"In2","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[327]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":175,"type":"processes/list","pos":[533,-98],"size":{"0":140,"1":46},"flags":{},"order":17,"mode":0,"inputs":[{"name":"In0","type":"process","link":343},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[308]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":45,"type":"model_part/OutputView","pos":[1435,-63],"size":{"0":638.62109375,"1":2610},"flags":{"collapsed":false},"order":24,"mode":0,"inputs":[{"name":"json","type":0,"link":313}],"properties":{}},{"id":217,"type":"processes/interval","pos":[-34,182],"size":{"0":210,"1":82},"flags":{},"order":10,"mode":0,"outputs":[{"name":"","type":"process_array","links":[345]}],"properties":{}},{"id":220,"type":"processes/AssignScalarVariableToConditionsProcess","pos":[263,87],"size":{"0":210,"1":102},"flags":{},"order":15,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":347},{"name":"interval","type":"process_array","link":345}],"outputs":[{"name":"Process","type":"process","links":[349]}],"properties":{"python_module":"assign_scalar_variable_to_conditions_process","kratos_module":"KratosMultiphysics","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.SurfacePressure3D_Pressure_on_surfaces_Auto3","variable_name":"POSITIVE_FACE_PRESSURE","value":"0","interval":[0,"End"]}},"widgets_values":["POSITIVE_FACE_PRESSURE","0"]},{"id":218,"type":"processes/AssignVectorVariableProcess","pos":[-27,-243],"size":{"0":210,"1":118},"flags":{},"order":13,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":339},{"name":"interval","type":"process_array","link":340},{"name":"constrained","type":"process_array","link":341},{"name":"value","type":"process_array","link":342}],"outputs":[{"name":"Process","type":"process","links":[343]}],"properties":{"python_module":"assign_vector_variable_process","kratos_module":"KratosMultiphysics","process_name":"AssignVectorVariableProcess","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.DISPLACEMENT_Displacement_Auto1","variable_name":"DISPLACEMENT","interval":[0,"End"],"constrained":[true,true,true],"value":[0,0,0]}},"widgets_values":["DISPLACEMENT"]},{"id":219,"type":"processes/AssignScalarVariableToConditionsProcess","pos":[261,-65],"size":{"0":210,"1":102},"flags":{},"order":14,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":346},{"name":"interval","type":"process_array","link":344}],"outputs":[{"name":"Process","type":"process","links":[348]}],"properties":{"python_module":"assign_scalar_variable_to_conditions_process","kratos_module":"KratosMultiphysics","Parameters":{"model_part_name":"Structure.COMPUTE_HROM.SurfacePressure3D_Pressure_on_surfaces_Auto2","variable_name":"POSITIVE_FACE_PRESSURE","value":"0","interval":[0,"End"]}},"widgets_values":["POSITIVE_FACE_PRESSURE","0"]}],"links":[[249,14,0,176,0,"material_array"],[250,176,0,177,0,"string"],[292,203,0,23,0,"process"],[304,23,0,206,6,"process_array"],[305,19,0,206,5,"process_array"],[306,204,0,206,4,"process_array"],[308,175,0,206,2,"process_array"],[310,4,0,206,0,"map"],[312,206,0,32,0,0],[313,206,0,45,0,0],[314,172,0,207,0,"map"],[315,177,0,207,1,"map"],[316,207,0,206,1,"map"],[321,208,0,14,0,"material"],[327,212,0,206,3,"process_array"],[331,149,0,208,0,"string"],[339,149,1,218,0,"string"],[340,197,0,218,1,"process_array"],[341,195,0,218,2,"process_array"],[342,186,0,218,3,"process_array"],[343,218,0,175,0,"process"],[344,214,0,219,1,"process_array"],[345,217,0,220,1,"process_array"],[346,149,2,219,0,"string"],[347,149,3,220,0,"string"],[348,219,0,212,0,"process"],[349,220,0,212,1,"process"]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file diff --git a/resources/examples/Test.json.json b/resources/examples/Test.json.json deleted file mode 100644 index cd6e325..0000000 --- a/resources/examples/Test.json.json +++ /dev/null @@ -1 +0,0 @@ -{"last_node_id":1,"last_link_id":0,"nodes":[{"id":1,"type":"model_part/ParsedModelPart","pos":[152,141],"size":{"0":210,"1":98},"flags":{},"order":0,"mode":0,"outputs":[{"name":"Parts_All","type":"string","links":null},{"name":"DISPLACEMENT_support","type":"string","links":null},{"name":"DISPLACEMENT_movement","type":"string","links":null}],"properties":{},"widgets_values":[""]}],"links":[],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file From d9b9f9d51a0f3fb8ebc2828d12ebd858b2fbfcf4 Mon Sep 17 00:00:00 2001 From: Raul Bravo Date: Thu, 14 Oct 2021 11:47:17 +0200 Subject: [PATCH 45/45] Updating Structural Mechanics example --- resources/examples/StructuralMechanics.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/examples/StructuralMechanics.json b/resources/examples/StructuralMechanics.json index 7e058ec..5afcab8 100644 --- a/resources/examples/StructuralMechanics.json +++ b/resources/examples/StructuralMechanics.json @@ -1 +1 @@ -{"last_node_id":212,"last_link_id":341,"nodes":[{"id":14,"type":"materials/materials_list","pos":[-16,-388],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":16,"mode":0,"inputs":[{"name":"In0","type":"material","link":290},{"name":"In1","type":"material","link":null}],"outputs":[{"name":"array","type":"material_array","links":[249]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":201,"type":"materials/StructuralMaterial","pos":[-268,-397],"size":{"0":210,"1":198},"flags":{},"order":13,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":330},{"name":"tables","type":"process_array","link":null}],"outputs":[{"name":"Material","type":"material","links":[290]}],"properties":{"model_part_name":"Structure.Parts_Solid_Solid_Auto1","properties_id":1,"Material":{"constitutive_law":{"name":"LinearElasticPlaneStress2DLaw"},"Variables":{"DENSITY":7850,"YOUNG_MODULUS":206900000000,"POISSON_RATIO":0.29,"THICKNESS":0.1},"Tables":{}}}},{"id":23,"type":"processes/list","pos":[1236,572],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":11,"mode":0,"inputs":[{"name":"In0","type":"process","link":292},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[304]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":19,"type":"processes/list","pos":[1232,464],"size":{"0":140,"1":46},"flags":{"collapsed":false},"order":12,"mode":0,"inputs":[{"name":"In0","type":"process","link":291},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[305]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":168,"type":"processes/list","pos":[542,389],"size":{"0":140,"1":46},"flags":{},"order":18,"mode":0,"inputs":[{"name":"In0","type":"process","link":341},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[307]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":4,"type":"parameters/ProblemData","pos":[1562,-337],"size":{"0":140,"1":86},"flags":{"collapsed":false},"order":0,"mode":0,"outputs":[{"name":"problem_data","type":"map","links":[310]},{"name":"problem_name","type":"string","links":null},{"name":"start_time","type":"number","links":null},{"name":"end_time","type":"number","links":null}],"properties":{"problem_name":"SWQ","parallel_type":"OpenMP","echo_level":1,"start_time":0,"end_time":10}},{"id":206,"type":"parameters/StructuralProjectParameters","pos":[1865,-34],"size":{"0":362.79998779296875,"1":146},"flags":{},"order":22,"mode":0,"inputs":[{"name":"problem_data","type":"map","link":310},{"name":"solver_settings","type":"map","link":317},{"name":"constraints_process_list","type":"process_array","link":308},{"name":"loads_process_list","type":"process_array","link":307},{"name":"list_other_processes","type":"process_array","link":306},{"name":"gid_output","type":"process_array","link":305},{"name":"vtk_output","type":"process_array","link":304}],"outputs":[{"name":"project_parameters","type":"map","links":[312,313]}],"properties":{}},{"id":204,"type":"processes/list","pos":[1523,180],"size":{"0":140,"1":46},"flags":{},"order":1,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[306]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":207,"type":"solver_settings/StructuralMechanicsSolver","pos":[720,-466],"size":{"0":337.6000061035156,"1":78},"flags":{},"order":21,"mode":0,"inputs":[{"name":"model_import_settings","type":"map","link":333},{"name":"material_import_settings","type":"map","link":315}],"outputs":[{"name":"solver_settings","type":"map","links":[317]}],"properties":{"solver_type":"static","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,"volumetric_strain_dofs":false}},{"id":195,"type":"processes/BooleanList","pos":[2,43],"size":{"0":210,"1":106},"flags":{},"order":2,"mode":0,"outputs":[{"name":"","type":"process_array","links":[320]}],"properties":{}},{"id":175,"type":"processes/list","pos":[549,-86],"size":{"0":140,"1":46},"flags":{},"order":17,"mode":0,"inputs":[{"name":"In0","type":"process","link":322},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[308]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":177,"type":"solver_settings_aux_nodes/MaterialImportSettings","pos":[396,-396],"size":{"0":287.20001220703125,"1":26},"flags":{},"order":20,"mode":0,"inputs":[{"name":"Materials filename","type":"string","link":250}],"outputs":[{"name":"solver_settings","type":"map","links":[315]}],"properties":{"materials_filename":""}},{"id":203,"type":"output_processes/VTK_structural","pos":[912,574],"size":{"0":295.8047180175781,"1":63.23921203613281},"flags":{},"order":4,"mode":0,"outputs":[{"name":"Process","type":"process","links":[292]}],"properties":{"python_module":"vtk_output_process","kratos_module":"KratosMultiphysics","process_name":"VtkOutputProcess","help":"This process writes postprocessing files for Paraview","Parameters":{"model_part_name":"Structure","output_control_type":"step","output_interval":1,"file_format":"ascii","output_precision":7,"output_sub_model_parts":false,"folder_name":"vtk_output","save_output_files_in_folder":true,"nodal_solution_step_data_variables":["DISPLACEMENT","REACTION"],"nodal_data_value_variables":[],"element_data_value_variables":[],"condition_data_value_variables":[],"gauss_point_variables_extrapolated_to_nodes":["VON_MISES_STRESS"]}}},{"id":202,"type":"output_processes/GiDStructural","pos":[972,446],"size":{"0":210,"1":82},"flags":{},"order":5,"mode":0,"outputs":[{"name":"Process","type":"process","links":[291]}],"properties":{"python_module":"gid_output_process","kratos_module":"KratosMultiphysics","process_name":"GiDOutputProcess","help":"This process writes postprocessing files for GiD","Parameters":{"model_part_name":"Structure","output_name":"SWQ","postprocess_parameters":{"result_file_configuration":{"gidpost_flags":{"GiDPostMode":"GiD_PostBinary","WriteDeformedMeshFlag":"WriteDeformed","WriteConditionsFlag":"WriteConditions","MultiFileFlag":"SingleFile"},"file_label":"step","output_control_type":"step","output_interval":1,"body_output":true,"node_output":false,"skin_output":false,"plane_output":[],"nodal_results":["DISPLACEMENT","REACTION"],"gauss_point_results":["VON_MISES_STRESS"],"nodal_nonhistorical_results":[]},"point_data_configuration":[]}}}},{"id":208,"type":"processes/AssignVectorVariableProcess","pos":[274,-85],"size":{"0":210,"1":118},"flags":{},"order":14,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":331},{"name":"interval","type":"process_array","link":319},{"name":"constrained","type":"process_array","link":320},{"name":"value","type":"process_array","link":321}],"outputs":[{"name":"Process","type":"process","links":[322]}],"properties":{"python_module":"assign_vector_variable_process","kratos_module":"KratosMultiphysics","process_name":"AssignVectorVariableProcess","Parameters":{"model_part_name":"Structure.DISPLACEMENT_Displacement_Auto1","variable_name":"DISPLACEMENT","interval":[0,"End"],"constrained":[true,true,true],"value":[0,-1,0]}},"widgets_values":["DISPLACEMENT"]},{"id":197,"type":"processes/interval","pos":[3,-81],"size":{"0":210,"1":82},"flags":{},"order":7,"mode":0,"outputs":[{"name":"","type":"process_array","links":[319]}],"properties":{}},{"id":149,"type":"model_part/ParsedModelPart","pos":[-929,-59],"size":{"0":278.79998779296875,"1":122},"flags":{},"order":8,"mode":0,"outputs":[{"name":".Parts_Solid_Solid_Auto1","type":"string","links":[330]},{"name":".DISPLACEMENT_Displacement_Auto1","type":"string","links":[331]},{"name":".LineLoad2D_Load_on_lines_Auto1","type":"string","links":[338]}],"properties":{"submodelpart_list":[".Parts_Solid_Solid_Auto1",".DISPLACEMENT_Displacement_Auto1",".LineLoad2D_Load_on_lines_Auto1"]},"widgets_values":["Structure",""]},{"id":199,"type":"processes/interval","pos":[-1,412],"size":{"0":210,"1":82},"flags":{},"order":9,"mode":0,"outputs":[{"name":"","type":"process_array","links":[339]}],"properties":{}},{"id":189,"type":"processes/Vector","pos":[-5,537],"size":{"0":210,"1":106},"flags":{},"order":10,"mode":0,"outputs":[{"name":"","type":"process_array","links":[340]}],"properties":{}},{"id":212,"type":"processes/AssignVectorByDirectionToConditionProcess","pos":[272,357],"size":{"0":210,"1":122},"flags":{},"order":15,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":338},{"name":"interval","type":"process_array","link":339},{"name":"direction","type":"process_array","link":340}],"outputs":[{"name":"Process","type":"process","links":[341]}],"properties":{"python_module":"assign_vector_by_direction_to_condition_process","kratos_module":"KratosMultiphysics","check":"DirectorVectorNonZero direction","process_name":"AssignVectorByDirectionToConditionProcess","Parameters":{"model_part_name":"Structure.LineLoad2D_Load_on_lines_Auto1","variable_name":"LINE_LOAD","interval":[0,"End"],"modulus":100000,"direction":[0,0,0]}},"widgets_values":["LINE_LOAD",100000]},{"id":210,"type":"solver_settings_aux_nodes/ModelImportSettings","pos":[455,-528],"size":{"0":210,"1":82},"flags":{},"order":6,"mode":0,"outputs":[{"name":"solver_settings","type":"map","links":[333]}],"properties":{"input_filename":""}},{"id":176,"type":"materials/Material Writer","pos":[134,-389],"size":{"0":210,"1":58},"flags":{},"order":19,"mode":0,"inputs":[{"name":"Material List","type":"material_array","link":249}],"outputs":[{"name":"Material","type":"string","links":[250]}],"properties":{}},{"id":45,"type":"model_part/OutputView","pos":[2294,55],"size":{"0":473.22265625,"1":3110},"flags":{"collapsed":false},"order":24,"mode":0,"inputs":[{"name":"json","type":0,"link":313}],"properties":{}},{"id":32,"type":"basic/DownloadProblem","pos":[2265,-60],"size":{"0":210,"1":78},"flags":{"collapsed":false},"order":23,"mode":0,"inputs":[{"name":"data","type":0,"link":312},{"name":"download","type":-1,"link":null}],"properties":{"filename":"data.json"}},{"id":186,"type":"processes/Vector","pos":[5,190],"size":{"0":210,"1":106},"flags":{},"order":3,"mode":0,"outputs":[{"name":"","type":"process_array","links":[321]}],"properties":{}}],"links":[[249,14,0,176,0,"material_array"],[250,176,0,177,0,"string"],[290,201,0,14,0,"material"],[291,202,0,19,0,"process"],[292,203,0,23,0,"process"],[304,23,0,206,6,"process_array"],[305,19,0,206,5,"process_array"],[306,204,0,206,4,"process_array"],[307,168,0,206,3,"process_array"],[308,175,0,206,2,"process_array"],[310,4,0,206,0,"map"],[312,206,0,32,0,0],[313,206,0,45,0,0],[315,177,0,207,1,"map"],[317,207,0,206,1,"map"],[319,197,0,208,1,"process_array"],[320,195,0,208,2,"process_array"],[321,186,0,208,3,"process_array"],[322,208,0,175,0,"process"],[330,149,0,201,0,"string"],[331,149,1,208,0,"string"],[333,210,0,207,0,"map"],[338,149,2,212,0,"string"],[339,199,0,212,1,"process_array"],[340,189,0,212,2,"process_array"],[341,212,0,168,0,"process"]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file +{"last_node_id":223,"last_link_id":374,"nodes":[{"id":45,"type":"model_part/OutputView","pos":[1435,333],"size":{"0":479.251953125,"1":3110},"flags":{"collapsed":false},"order":9,"mode":0,"inputs":[{"name":"json","type":0,"link":313}],"properties":{}},{"id":206,"type":"parameters/StructuralProjectParameters","pos":[949,459],"size":{"0":362.79998779296875,"1":146},"flags":{},"order":7,"mode":0,"inputs":[{"name":"problem_data","type":"map","link":310},{"name":"solver_settings","type":"map","link":364},{"name":"constraints_process_list","type":"process_array","link":362},{"name":"loads_process_list","type":"process_array","link":360},{"name":"list_other_processes","type":"process_array","link":358},{"name":"gid_output","type":"process_array","link":356},{"name":"vtk_output","type":"process_array","link":357}],"outputs":[{"name":"project_parameters","type":"map","links":[312,313]}],"properties":{}},{"id":214,"type":"graph/subgraph","pos":[401,658],"size":[200,90],"flags":{"collapsed":false},"order":1,"mode":0,"inputs":[],"outputs":[{"name":"GiD Output","type":"process_array","links":[356]},{"name":"VTK Output","type":"process_array","links":[357]}],"title":"Output Processes","properties":{"enabled":true},"subgraph":{"last_node_id":7,"last_link_id":6,"nodes":[{"id":1,"type":"output_processes/GiDStructural","pos":[545,266],"size":{"0":210,"1":82},"flags":{},"order":0,"mode":0,"outputs":[{"name":"Process","type":"process","links":[1]}],"properties":{"python_module":"gid_output_process","kratos_module":"KratosMultiphysics","process_name":"GiDOutputProcess","help":"This process writes postprocessing files for GiD","Parameters":{"model_part_name":"Structure","output_name":"SWQ","postprocess_parameters":{"result_file_configuration":{"gidpost_flags":{"GiDPostMode":"GiD_PostBinary","WriteDeformedMeshFlag":"WriteDeformed","WriteConditionsFlag":"WriteConditions","MultiFileFlag":"SingleFile"},"file_label":"step","output_control_type":"step","output_interval":1,"body_output":true,"node_output":false,"skin_output":false,"plane_output":[],"nodal_results":["DISPLACEMENT","REACTION"],"gauss_point_results":["VON_MISES_STRESS"],"nodal_nonhistorical_results":[]},"point_data_configuration":[]}}}},{"id":2,"type":"output_processes/VTK_structural","pos":[566,492],"size":{"0":210,"1":58},"flags":{},"order":1,"mode":0,"outputs":[{"name":"Process","type":"process","links":[2]}],"properties":{"python_module":"vtk_output_process","kratos_module":"KratosMultiphysics","process_name":"VtkOutputProcess","help":"This process writes postprocessing files for Paraview","Parameters":{"model_part_name":"Structure","output_control_type":"step","output_interval":1,"file_format":"ascii","output_precision":7,"output_sub_model_parts":false,"folder_name":"vtk_output","save_output_files_in_folder":true,"nodal_solution_step_data_variables":["DISPLACEMENT","REACTION"],"nodal_data_value_variables":[],"element_data_value_variables":[],"condition_data_value_variables":[],"gauss_point_variables_extrapolated_to_nodes":["VON_MISES_STRESS"]}}},{"id":3,"type":"processes/list","pos":[1289,266],"size":{"0":140,"1":46},"flags":{},"order":2,"mode":0,"inputs":[{"name":"In0","type":"process","link":1},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[5]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":4,"type":"processes/list","pos":[1266,484],"size":{"0":140,"1":46},"flags":{},"order":3,"mode":0,"inputs":[{"name":"In0","type":"process","link":2},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[6]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":7,"type":"graph/output","pos":[1584,483],"size":[180,60],"flags":{},"order":5,"mode":0,"inputs":[{"name":"","type":"process_array","link":6}],"properties":{"name":"VTK Output","type":"process_array"}},{"id":6,"type":"graph/output","pos":[1592,266],"size":[180,60],"flags":{},"order":4,"mode":0,"inputs":[{"name":"","type":"process_array","link":5}],"properties":{"name":"GiD Output","type":"process_array"}}],"links":[[1,1,0,3,0,"process"],[2,2,0,4,0,"process"],[5,3,0,6,0,"process_array"],[6,4,0,7,0,0]],"groups":[],"config":{},"extra":{},"version":0.4}},{"id":220,"type":"graph/subgraph","pos":[389,323],"size":[200,70],"flags":{},"order":4,"mode":0,"inputs":[{"name":"model_part","type":"string","link":372}],"outputs":[{"name":"constraints","type":"process_array","links":[362]}],"title":"Constraints","properties":{"enabled":true},"subgraph":{"last_node_id":8,"last_link_id":11,"nodes":[{"id":7,"type":"graph/input","pos":[293,186],"size":[180,90],"flags":{},"order":0,"mode":0,"outputs":[{"name":"","type":"string","links":[7]}],"properties":{"name":"model_part","type":"string","value":""}},{"id":1,"type":"processes/interval","pos":[279,342],"size":{"0":210,"1":82},"flags":{},"order":1,"mode":0,"outputs":[{"name":"","type":"process_array","links":[8]}],"properties":{}},{"id":2,"type":"processes/BooleanList","pos":[278,501],"size":{"0":210,"1":106},"flags":{},"order":2,"mode":0,"outputs":[{"name":"","type":"process_array","links":[9]}],"properties":{}},{"id":3,"type":"processes/Vector","pos":[281,688],"size":{"0":210,"1":106},"flags":{},"order":3,"mode":0,"outputs":[{"name":"","type":"process_array","links":[10]}],"properties":{}},{"id":8,"type":"processes/AssignVectorVariableProcess","pos":[690,277],"size":{"0":210,"1":118},"flags":{},"order":4,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":7},{"name":"interval","type":"process_array","link":8},{"name":"constrained","type":"process_array","link":9},{"name":"value","type":"process_array","link":10}],"outputs":[{"name":"Process","type":"process","links":[11]}],"properties":{"python_module":"assign_vector_variable_process","kratos_module":"KratosMultiphysics","process_name":"AssignVectorVariableProcess","Parameters":{"model_part_name":"Structure.DISPLACEMENT_Ground","variable_name":"DISPLACEMENT","interval":[0,"End"],"constrained":[true,true,true],"value":[0,0,0]}},"widgets_values":["DISPLACEMENT"]},{"id":6,"type":"processes/list","pos":[1057,281],"size":{"0":140,"1":46},"flags":{},"order":5,"mode":0,"inputs":[{"name":"In0","type":"process","link":11},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[5]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":5,"type":"graph/output","pos":[1373,280],"size":[180,60],"flags":{},"order":6,"mode":0,"inputs":[{"name":"","type":"process_array","link":5}],"properties":{"name":"constraints","type":"process_array"}}],"links":[[5,6,0,5,0,"process_array"],[7,7,0,8,0,"string"],[8,1,0,8,1,"process_array"],[9,2,0,8,2,"process_array"],[10,3,0,8,3,"process_array"],[11,8,0,6,0,"process"]],"groups":[],"config":{},"extra":{},"version":0.4}},{"id":221,"type":"graph/subgraph","pos":[573,108],"size":[200,90],"flags":{},"order":6,"mode":0,"inputs":[{"name":"Main model part","type":"string","link":371},{"name":"File Name","type":"string","link":374}],"outputs":[{"name":"solver","type":"map","links":[364]}],"title":"Materials and Model","properties":{"enabled":true},"subgraph":{"last_node_id":10,"last_link_id":10,"nodes":[{"id":7,"type":"graph/input","pos":[19,652],"size":[180,90],"flags":{},"order":0,"mode":0,"outputs":[{"name":"","type":"string","links":[6]}],"properties":{"name":"Main model part","type":"string","value":""}},{"id":1,"type":"materials/StructuralMaterial","pos":[253,652],"size":{"0":210,"1":198},"flags":{},"order":2,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":6},{"name":"tables","type":"process_array","link":null}],"outputs":[{"name":"Material","type":"material","links":[1]}],"properties":{"model_part_name":"Structure.Parts_Solid_Solid_Auto1","properties_id":1,"Material":{"constitutive_law":{"name":"LinearElasticPlaneStress2DLaw"},"Variables":{"DENSITY":7850,"YOUNG_MODULUS":206900000000,"POISSON_RATIO":0.29,"THICKNESS":0.1},"Tables":{}}}},{"id":3,"type":"materials/materials_list","pos":[505,652],"size":{"0":140,"1":46},"flags":{},"order":4,"mode":0,"inputs":[{"name":"In0","type":"material","link":1},{"name":"In1","type":"material","link":null}],"outputs":[{"name":"array","type":"material_array","links":[2]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":2,"type":"materials/Material Writer","pos":[689,652],"size":{"0":210,"1":58},"flags":{},"order":5,"mode":0,"inputs":[{"name":"Material List","type":"material_array","link":2}],"outputs":[{"name":"Material","type":"string","links":[3]}],"properties":{}},{"id":6,"type":"solver_settings_aux_nodes/MaterialImportSettings","pos":[944,650],"size":{"0":287.20001220703125,"1":26},"flags":{},"order":6,"mode":0,"inputs":[{"name":"Materials filename","type":"string","link":3}],"outputs":[{"name":"solver_settings","type":"map","links":[9]}],"properties":{"materials_filename":""}},{"id":9,"type":"graph/input","pos":[22,92],"size":[180,90],"flags":{},"order":1,"mode":0,"outputs":[{"name":"","type":"string","links":[7]}],"properties":{"name":"File Name","type":"string","value":""}},{"id":4,"type":"solver_settings_aux_nodes/ModelImportSettings","pos":[250,95],"size":{"0":253.60000610351562,"1":58},"flags":{},"order":3,"mode":0,"inputs":[{"name":"Input filename","type":"string","link":7}],"outputs":[{"name":"solver_settings","type":"map","links":[10]}],"properties":{"input_filename":""}},{"id":5,"type":"solver_settings/StructuralMechanicsSolver","pos":[1225,97],"size":{"0":337.6000061035156,"1":78},"flags":{},"order":7,"mode":0,"inputs":[{"name":"model_import_settings","type":"map","link":10},{"name":"material_import_settings","type":"map","link":9}],"outputs":[{"name":"solver_settings","type":"map","links":[8]}],"properties":{"solver_type":"static","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,"volumetric_strain_dofs":false}},{"id":10,"type":"graph/output","pos":[1656,97],"size":[180,60],"flags":{},"order":8,"mode":0,"inputs":[{"name":"","type":"map","link":8}],"properties":{"name":"solver","type":"map"}}],"links":[[1,1,0,3,0,"material"],[2,3,0,2,0,"material_array"],[3,2,0,6,0,"string"],[6,7,0,1,0,"string"],[7,9,0,4,0,"string"],[8,5,0,10,0,"map"],[9,6,0,5,1,"map"],[10,4,0,5,0,"map"]],"groups":[],"config":{},"extra":{},"version":0.4}},{"id":219,"type":"graph/subgraph","pos":[398,476],"size":[200,70],"flags":{},"order":5,"mode":0,"inputs":[{"name":"model_part","type":"string","link":373}],"outputs":[{"name":"Loads","type":"process_array","links":[360]}],"title":"Loads","properties":{"enabled":true},"subgraph":{"last_node_id":11,"last_link_id":10,"nodes":[{"id":5,"type":"processes/list","pos":[1188,304],"size":{"0":140,"1":46},"flags":{},"order":4,"mode":0,"inputs":[{"name":"In0","type":"process","link":10},{"name":"In1","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[5]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":7,"type":"graph/output","pos":[1525,301],"size":[180,60],"flags":{},"order":5,"mode":0,"inputs":[{"name":"","type":"process_array","link":5}],"properties":{"name":"Loads","type":"process_array"}},{"id":10,"type":"graph/input","pos":[403,132],"size":[180,90],"flags":{},"order":0,"mode":0,"outputs":[{"name":"","type":"string","links":[7]}],"properties":{"name":"model_part","type":"string","value":""}},{"id":3,"type":"processes/interval","pos":[388,314],"size":{"0":210,"1":82},"flags":{},"order":1,"mode":0,"outputs":[{"name":"","type":"process_array","links":[8]}],"properties":{}},{"id":11,"type":"processes/AssignVectorByDirectionToConditionProcess","pos":[837,303],"size":{"0":210,"1":122},"flags":{},"order":3,"mode":0,"inputs":[{"name":"model_part_name","type":"string","link":7},{"name":"interval","type":"process_array","link":8},{"name":"direction","type":"process_array","link":9}],"outputs":[{"name":"Process","type":"process","links":[10]}],"properties":{"python_module":"assign_vector_by_direction_to_condition_process","kratos_module":"KratosMultiphysics","check":"DirectorVectorNonZero direction","process_name":"AssignVectorByDirectionToConditionProcess","Parameters":{"model_part_name":"Structure.LineLoad2D_InterfaceStructure","variable_name":"LINE_LOAD","interval":[0,"End"],"modulus":100000,"direction":[0.9999999999999999,0,0]}},"widgets_values":["LINE_LOAD",100000]},{"id":1,"type":"processes/Vector","pos":[385,477],"size":{"0":210,"1":106},"flags":{},"order":2,"mode":0,"outputs":[{"name":"","type":"process_array","links":[9]}],"properties":{}}],"links":[[5,5,0,7,0,"process_array"],[7,10,0,11,0,"string"],[8,3,0,11,1,"process_array"],[9,1,0,11,2,"process_array"],[10,11,0,5,0,"process"]],"groups":[],"config":{},"extra":{},"version":0.4}},{"id":204,"type":"processes/list","pos":[632,558],"size":{"0":140,"1":46},"flags":{},"order":0,"mode":0,"inputs":[{"name":"In0","type":"process","link":null}],"outputs":[{"name":"array","type":"process_array","links":[358]},{"name":"size","type":"number","links":null}],"properties":{}},{"id":4,"type":"parameters/ProblemData","pos":[657,259],"size":{"0":140,"1":86},"flags":{"collapsed":false},"order":2,"mode":0,"outputs":[{"name":"problem_data","type":"map","links":[310]},{"name":"problem_name","type":"string","links":null},{"name":"start_time","type":"number","links":null},{"name":"end_time","type":"number","links":null}],"properties":{"problem_name":"SWQ","parallel_type":"OpenMP","echo_level":1,"start_time":0,"end_time":10}},{"id":223,"type":"model_part/ParsedModelPart","pos":[21,201],"size":{"0":262,"1":142},"flags":{},"order":3,"mode":0,"outputs":[{"name":".Parts_Solid_Structure","type":"string","links":[371]},{"name":".DISPLACEMENT_Ground","type":"string","links":[372]},{"name":".LineLoad2D_InterfaceStructure","type":"string","links":[373]},{"name":"File Name","type":"string","links":[374]}],"properties":{"submodelpart_list":[".Parts_Solid_Structure",".DISPLACEMENT_Ground",".LineLoad2D_InterfaceStructure"]},"widgets_values":["Structure",""]},{"id":32,"type":"basic/DownloadProblem","pos":[1412,72],"size":{"0":210,"1":78},"flags":{"collapsed":false},"order":8,"mode":0,"inputs":[{"name":"data","type":0,"link":312},{"name":"download","type":-1,"link":null}],"properties":{"filename":"data.json"}}],"links":[[310,4,0,206,0,"map"],[312,206,0,32,0,0],[313,206,0,45,0,0],[356,214,0,206,5,"process_array"],[357,214,1,206,6,"process_array"],[358,204,0,206,4,"process_array"],[360,219,0,206,3,"process_array"],[362,220,0,206,2,"process_array"],[364,221,0,206,1,"map"],[371,223,0,221,0,"string"],[372,223,1,220,0,"string"],[373,223,2,219,0,"string"],[374,223,3,221,1,"string"]],"groups":[],"config":{},"extra":{},"version":0.4} \ No newline at end of file