diff --git a/kratos.gid/apps/Dam/python/MainKratos.py b/kratos.gid/apps/Dam/python/MainKratos.py index ffa6a714b..713c571ca 100644 --- a/kratos.gid/apps/Dam/python/MainKratos.py +++ b/kratos.gid/apps/Dam/python/MainKratos.py @@ -22,10 +22,6 @@ def __init__(self, model): self.DefineParallelType() self.DefineVariables() - if self.consider_selfweight: - self.model_selfweight = KratosMultiphysics.Model() - self.PreviousSelfweightProblem() - self.CreateModelPart() if self.add_previous_results: @@ -64,7 +60,6 @@ def DefineVariables(self): self.problem_path = os.getcwd() self.echo_level = self.ProjectParameters["solver_settings"]["echo_level"].GetInt() self.buffer_size = self.ProjectParameters["solver_settings"]["buffer_size"].GetInt() - self.consider_selfweight = self.ProjectParameters["problem_data"]["consider_selfweight"].GetBool() self.consider_construction = self.ProjectParameters["problem_data"]["consider_construction"].GetBool() self.use_streamline_utility = self.ProjectParameters["problem_data"]["streamlines_utility"].GetBool() self.delta_time = self.ProjectParameters["problem_data"]["time_step"].GetDouble() @@ -131,64 +126,6 @@ def SetSolver(self): solver_module = import_module(full_module_name) self.solver = solver_module.CreateSolver(self.main_model_part, self.ProjectParameters["solver_settings"]) - def PreviousSelfweightProblem(self): - # Parsing parmeters of Selfweight Problem - self_parameter_file = open("ProjectParametersSelfWeight.json",'r') - SelfWeightProjectParameters = KratosMultiphysics.Parameters( self_parameter_file.read()) - - ## Creating Selfweight model part -------------------------------------------------------------- - self.self_weight_model_part = self.model_selfweight.CreateModelPart("SelfWeight") - self.self_weight_model_part.ProcessInfo.SetValue(KratosMultiphysics.DOMAIN_SIZE, self.domain_size) - self.self_weight_model_part.ProcessInfo.SetValue(KratosMultiphysics.TIME, self.time) - self.self_weight_model_part.ProcessInfo.SetValue(KratosMultiphysics.DELTA_TIME, self.delta_time) - self.self_weight_model_part.ProcessInfo.SetValue(KratosDam.TIME_UNIT_CONVERTER, self.time_unit_converter) - - ## Construct the solver for selfweight problem ------------------------------------------------- - selfweight_solver_module = __import__(SelfWeightProjectParameters["solver_settings"]["solver_type"].GetString()) - selfweight_solver = selfweight_solver_module.CreateSolver(self.self_weight_model_part, SelfWeightProjectParameters["solver_settings"]) - selfweight_solver.AddVariables() - selfweight_solver.ImportModelPart() - selfweight_solver.AddDofs() - - ## Kratos Selfweight Model --------------------------------------------------------------------- - #DamSelfWeightModel = KratosMultiphysics.Model() - #DamSelfWeightModel.AddModelPart(self.self_weight_model_part) - - ## Initialize ---------------------------------------------------------------------------------- - - # Construct processes to be applied - import KratosMultiphysics.process_factory - self_list_of_processes = process_factory.KratosProcessFactory(DamSelfWeightModel).ConstructListOfProcesses( SelfWeightProjectParameters["constraints_process_list"] ) - self_list_of_processes += process_factory.KratosProcessFactory(DamSelfWeightModel).ConstructListOfProcesses( SelfWeightProjectParameters["loads_process_list"] ) - - # Initialize processes - for process in self_list_of_processes: - process.ExecuteInitialize() - - # Set TIME and DELTA_TIME and fill the previous steps of the buffer with the initial conditions - self_time = self.time - (self.buffer_size-1) * self.delta_time - self.self_weight_model_part.ProcessInfo.SetValue(KratosMultiphysics.TIME, self.time) - for step in range(self.buffer_size-1): - self_time = self_time + self.delta_time - self.self_weight_model_part.CloneTimeStep(self_time) - - # Initialize the solver - selfweight_solver.Initialize() - - # ExecuteBeforeSolutionLoop - for process in self_list_of_processes: - process.ExecuteBeforeSolutionLoop() - - # Solving selfweight problem - selfweight_solver.Solve() - - # Cleaning selfweight solver - selfweight_solver.Clear() - - # Initialize transfer_selfweight_stress_utility - from KratosMultiphysics.DamApplication import transfer_selfweight_stress_utility - self.transfer_utility = transfer_selfweight_stress_utility.TransferSelfweightStressToMainModelPartUtility() - def Run(self): self.Initialize() @@ -360,15 +297,11 @@ def RunMainTemporalLoop(self): for self.process in self.list_of_processes: self.process.ExecuteBeforeOutputStep() - # selfweight utility - if self.consider_selfweight: - self.transfer_utility.Transfer(self.self_weight_model_part, self.main_model_part, self.domain_size) - # add previous results utility if self.add_previous_results and self.add_stress: if self.type_of_results == "Mechanical" or self.type_of_results == "Thermo-Mechanical": - from KratosMultiphysics.DamApplication import transfer_selfweight_stress_utility - self.transfer_utility = transfer_selfweight_stress_utility.TransferSelfweightStressToMainModelPartUtility() + from KratosMultiphysics.DamApplication import transfer_initial_stress_utility + self.transfer_utility = transfer_initial_stress_utility.TransferInitialStressToMainModelPartUtility() self.transfer_utility.TransferInitialStress(self.main_model_part, self.domain_size) # Write GiD results diff --git a/kratos.gid/apps/Dam/python/dam_main_selfweight.py b/kratos.gid/apps/Dam/python/dam_main_selfweight.py deleted file mode 100644 index 85427d4bc..000000000 --- a/kratos.gid/apps/Dam/python/dam_main_selfweight.py +++ /dev/null @@ -1,308 +0,0 @@ -# Time monitoring -import time as timer -print(timer.ctime()) -initial_time = timer.perf_counter() - -## Importing modules ----------------------------------------------------------------------------------------- - -# Import system python -import os - -# Import kratos core and applications -import KratosMultiphysics -import KratosMultiphysics.LinearSolversApplication as KratosSolvers -#import KratosMultiphysics.TrilinosApplication as TrilinosApplication -import KratosMultiphysics.ConvectionDiffusionApplication as KratosConvDiff -import KratosMultiphysics.SolidMechanicsApplication as KratosSolid -import KratosMultiphysics.PoromechanicsApplication as KratosPoro -import KratosMultiphysics.DamApplication as KratosDam - -# Parsing the parameters -parameter_file = open("ProjectParameters.json",'r') -ProjectParameters = KratosMultiphysics.Parameters( parameter_file.read()) - -# Parsing parmeters of Selfweight Problem -self_parameter_file = open("ProjectParametersSelfWeight.json",'r') -SelfWeightProjectParameters = KratosMultiphysics.Parameters( self_parameter_file.read()) - -# Parallel Configuration -parallel_type = ProjectParameters["problem_data"]["parallel_type"].GetString() -parallel=KratosMultiphysics.OpenMPUtils() -parallel.SetNumThreads(ProjectParameters["problem_data"]["number_of_threads"].GetInt()) -if parallel_type == "MPI": - import KratosMultiphysics.mpi as KratosMPI - print("MPI parallel configuration. OMP_NUM_THREADS =",parallel.GetNumThreads()) -else: - print("OpenMP parallel configuration. OMP_NUM_THREADS =",parallel.GetNumThreads()) - -## Defining variables ---------------------------------------------------------------------------------------- - -domain_size = ProjectParameters["problem_data"]["domain_size"].GetInt() -problem_name = ProjectParameters["problem_data"]["problem_name"].GetString() -problem_path = os.getcwd() -echo_level = ProjectParameters["solver_settings"]["echo_level"].GetInt() -buffer_size = ProjectParameters["solver_settings"]["buffer_size"].GetInt() -use_streamline_utility = ProjectParameters["problem_data"]["streamlines_utility"].GetBool() -delta_time = ProjectParameters["problem_data"]["time_step"].GetDouble() -end_time = ProjectParameters["problem_data"]["end_time"].GetDouble() -time = ProjectParameters["problem_data"]["start_time"].GetDouble() -tol = delta_time*1.0e-10 -time_scale = ProjectParameters["problem_data"]["time_scale"].GetString() -# Time Units Converter -if(time_scale=="Weeks"): # Factor to pass from weeks to seconds - time_unit_converter = 604800.0 -elif(time_scale=="Days"): # Factor to pass from days to seconds - time_unit_converter = 86400.0 -elif(time_scale=="Hours"): # Factor to pass from hours to seconds - time_unit_converter = 3600.0 -else: # No changes - time_unit_converter = 1.0 - -# Update time variables -start_time = time -delta_time = delta_time * time_unit_converter -end_time = end_time * time_unit_converter -time = time * time_unit_converter -tol = tol * time_unit_converter - -## PREVIOUS SELFWEIGHT PROBLEM ------------------------------------------------------------------------------------------------ -## In case that was needed a previous problem just considering the selfweight is solved. The aim of this is to sum the computed -## stresses but not the displacements field. This can be controlled through a tab in the inteface. - -consider_selfweight = ProjectParameters["problem_data"]["consider_selfweight"].GetBool() -if(consider_selfweight == True): - - ## Creating Selfweight model part -------------------------------------------------------------- - self_weight_model_part = KratosMultiphysics.ModelPart("SelfWeight") - self_weight_model_part.ProcessInfo.SetValue(KratosMultiphysics.DOMAIN_SIZE, domain_size) - self_weight_model_part.ProcessInfo.SetValue(KratosMultiphysics.TIME, time) - self_weight_model_part.ProcessInfo.SetValue(KratosMultiphysics.DELTA_TIME, delta_time) - self_weight_model_part.ProcessInfo.SetValue(KratosPoro.TIME_UNIT_CONVERTER, time_unit_converter) - - ## Construct the solver for selfweight problem ------------------------------------------------- - selfweight_solver_module = __import__(SelfWeightProjectParameters["solver_settings"]["solver_type"].GetString()) - selfweight_solver = selfweight_solver_module.CreateSolver(self_weight_model_part, SelfWeightProjectParameters["solver_settings"]) - selfweight_solver.AddVariables() - selfweight_solver.ImportModelPart() - selfweight_solver.AddDofs() - - ## Kratos Selfweight Model --------------------------------------------------------------------- - DamSelfWeightModel = KratosMultiphysics.Model() - DamSelfWeightModel.AddModelPart(self_weight_model_part) - - ## Get the list of the submodel part in the object Model - #for i in range(SelfWeightProjectParameters["solver_settings"]["processes_sub_model_part_list"].size()): - # self_part_name = SelfWeightProjectParameters["solver_settings"]["processes_sub_model_part_list"][i].GetString() - # DamSelfWeightModel.AddModelPart(self_weight_model_part.GetSubModelPart(self_part_name)) - - - ## Initialize ---------------------------------------------------------------------------------- - - # Construct processes to be applied - import process_factory - self_list_of_processes = process_factory.KratosProcessFactory(DamSelfWeightModel).ConstructListOfProcesses( SelfWeightProjectParameters["constraints_process_list"] ) - - # Initialize processes - for process in self_list_of_processes: - process.ExecuteInitialize() - - # Set TIME and DELTA_TIME and fill the previous steps of the buffer with the initial conditions - self_time = time - (buffer_size-1)*delta_time - self_weight_model_part.ProcessInfo.SetValue(KratosMultiphysics.TIME, time) - for step in range(buffer_size-1): - self_time = self_time + delta_time - self_weight_model_part.CloneTimeStep(self_time) - - # Initialize the solver - selfweight_solver.Initialize() - - # ExecuteBeforeSolutionLoop - for process in self_list_of_processes: - process.ExecuteBeforeSolutionLoop() - - # Getting gravity direction - direction_selfweight = ProjectParameters["problem_data"]["selfweight_direction"].GetString() - if(direction_selfweight == "X"): - variable_name = KratosMultiphysics.VOLUME_ACCELERATION_X - elif(direction_selfweight == "Y"): - variable_name = KratosMultiphysics.VOLUME_ACCELERATION_Y - else: - variable_name = KratosMultiphysics.VOLUME_ACCELERATION_Z - - # Set the acceleration at the nodes according to gravity direction - for node in self_weight_model_part.Nodes: - node.SetSolutionStepValue(variable_name, -9.81) - - # Solving selfweight problem - selfweight_solver.Solve() - - # Cleaning selfweight solver - selfweight_solver.Clear() - - # Initialize transfer_selfweight_stress_utility - import transfer_selfweight_stress_utility - transfer_utility = transfer_selfweight_stress_utility.TransferSelfweightStressToMainModelPartUtility() - - -## DEFINED PROBLEM ------------------------------------------------------------------------------------------------ - -## Model part ------------------------------------------------------------------------------------------------ - -# Defining the model part -main_model_part = KratosMultiphysics.ModelPart(ProjectParameters["problem_data"]["model_part_name"].GetString()) -main_model_part.ProcessInfo.SetValue(KratosMultiphysics.DOMAIN_SIZE, domain_size) -main_model_part.ProcessInfo.SetValue(KratosMultiphysics.TIME, time) -main_model_part.ProcessInfo.SetValue(KratosMultiphysics.DELTA_TIME, delta_time) -main_model_part.ProcessInfo.SetValue(KratosPoro.TIME_UNIT_CONVERTER, time_unit_converter) - -# Construct the solver (main setting methods are located in the solver_module) -solver_module = __import__(ProjectParameters["solver_settings"]["solver_type"].GetString()) -solver = solver_module.CreateSolver(main_model_part, ProjectParameters["solver_settings"]) - -# Add problem variables -solver.AddVariables() - -# Read model_part (note: the buffer_size is set here) -solver.ImportModelPart() - -# Add degrees of freedom -solver.AddDofs() - -# Creation of Kratos model -DamModel = KratosMultiphysics.Model() -DamModel.AddModelPart(main_model_part) - -# Build sub_model_parts or submeshes (rearrange parts for the application of custom processes) -## Get the list of the submodel part in the object Model -#for i in range(ProjectParameters["solver_settings"]["processes_sub_model_part_list"].size()): -# part_name = ProjectParameters["solver_settings"]["processes_sub_model_part_list"][i].GetString() -# DamModel.AddModelPart(main_model_part.GetSubModelPart(part_name)) - -# Print model_part and properties -if(echo_level > 1): - print(main_model_part) - for properties in main_model_part.Properties: - print(properties) - - -## Initialize ------------------------------------------------------------------------------------------------ - -# Construct processes to be applied -import process_factory -list_of_processes = process_factory.KratosProcessFactory(DamModel).ConstructListOfProcesses( ProjectParameters["constraints_process_list"] ) -list_of_processes += process_factory.KratosProcessFactory(DamModel).ConstructListOfProcesses( ProjectParameters["loads_process_list"] ) - -# Print list of constructed processes -if(echo_level>1): - for process in list_of_processes: - print(process) - -# Initialize processes -for process in list_of_processes: - process.ExecuteInitialize() - -# Set TIME and DELTA_TIME and fill the previous steps of the buffer with the initial conditions -time = time - (buffer_size-1)*delta_time -main_model_part.ProcessInfo.SetValue(KratosMultiphysics.TIME, time) -for step in range(buffer_size-1): - time = time + delta_time - main_model_part.CloneTimeStep(time) - -# Initialize GiD I/O -computing_model_part = solver.GetComputingModelPart() -output_settings = ProjectParameters["output_configuration"] -if parallel_type == "OpenMP": - import poromechanics_cleaning_utility - poromechanics_cleaning_utility.CleanPreviousFiles(problem_path) # Clean previous post files - from gid_dam_output_process import GiDDamOutputProcess - gid_output = GiDDamOutputProcess(computing_model_part, - problem_name, - start_time, - output_settings) -else: - from gid_output_process_mpi import GiDOutputProcessMPI - gid_output = GiDOutputProcessMPI(computing_model_part, - problem_name, - start_time, - output_settings) -gid_output.ExecuteInitialize() - -# Initialize the solver -solver.Initialize() - -# ExecuteBeforeSolutionLoop -for process in list_of_processes: - process.ExecuteBeforeSolutionLoop() - -## Set results when they are written in a single file -gid_output.ExecuteBeforeSolutionLoop() - -# Initialize streamlines_output_utility -UseStreamlineUtility = False -if (use_streamline_utility == True and domain_size==3): - UseStreamlineUtility = True - import streamlines_output_utility - streamline_utility = streamlines_output_utility.StreamlinesOutputUtility(domain_size) - -if (echo_level > 1): - f = open("ProjectParametersOutput.json", 'w') - f.write(ProjectParameters.PrettyPrintJsonString()) - f.close() - -## Temporal loop --------------------------------------------------------------------------------------------- - -while( (time+tol) <= end_time ): - - # Update temporal variables - delta_time = main_model_part.ProcessInfo[KratosMultiphysics.DELTA_TIME] - time = time + delta_time - main_model_part.CloneTimeStep(time) - - # Update imposed conditions - for process in list_of_processes: - process.ExecuteInitializeSolutionStep() - - gid_output.ExecuteInitializeSolutionStep() - - # Solve step - solver.Solve() - - # streamlines_output_utility - if (UseStreamlineUtility== True): - streamline_utility.ComputeOutputStep( main_model_part ,domain_size) - - gid_output.ExecuteFinalizeSolutionStep() - - for process in list_of_processes: - process.ExecuteFinalizeSolutionStep() - - for process in list_of_processes: - process.ExecuteBeforeOutputStep() - - # transfer_selfweight_stress_utility - if (consider_selfweight== True): - transfer_utility.Transfer( self_weight_model_part, main_model_part, domain_size) - - # Write GiD results - if gid_output.IsOutputStep(): - gid_output.PrintOutput() - - for process in list_of_processes: - process.ExecuteAfterOutputStep() - - -## Finalize -------------------------------------------------------------------------------------------------- - -# Finalizing output files -gid_output.ExecuteFinalize() - -for process in list_of_processes: - process.ExecuteFinalize() - -# Finalizing strategy -if parallel_type == "OpenMP": - solver.Clear() - -# Time control -print("Analysis Completed. Elapsed Time = %.3f" % (timer.perf_counter() - initial_time)," seconds.") -print(timer.ctime()) diff --git a/kratos.gid/apps/Dam/write/write.tcl b/kratos.gid/apps/Dam/write/write.tcl index 90401fd6a..bced35d02 100644 --- a/kratos.gid/apps/Dam/write/write.tcl +++ b/kratos.gid/apps/Dam/write/write.tcl @@ -109,9 +109,6 @@ proc ::Dam::write::writeConditions { } { set ThermalConditionGroups [::write::writeConditions [GetAttribute thermal_conditions_un] $index] set ConditionsDictGroupIterators [dict merge $ConditionsDictGroupIterators $ThermalConditionGroups] - - set SelfweightConditionGroups [::write::writeConditions "DamSelfweight" $index] - set ConditionsDictGroupIterators [dict merge $ConditionsDictGroupIterators $SelfweightConditionGroups] } proc ::Dam::write::writeMeshes { } { @@ -269,7 +266,7 @@ proc ::Dam::write::GetPrinTables {} { set tableid_list [list ] set files_list [list ] set num 0 - set origins [list [GetAttribute conditions_un] [GetAttribute thermal_conditions_un] [GetAttribute nodal_conditions_un] "DamSelfweight"] + set origins [list [GetAttribute conditions_un] [GetAttribute thermal_conditions_un] [GetAttribute nodal_conditions_un]] foreach unique_name $origins { set xpathCond "[spdAux::getRoute $unique_name]/condition/group/value\[@type='tablefile'\]" foreach node [$root selectNodes $xpathCond] { diff --git a/kratos.gid/apps/Dam/write/writeProjectParameters.tcl b/kratos.gid/apps/Dam/write/writeProjectParameters.tcl index d3461c5d1..a9b74bdc8 100644 --- a/kratos.gid/apps/Dam/write/writeProjectParameters.tcl +++ b/kratos.gid/apps/Dam/write/writeProjectParameters.tcl @@ -55,16 +55,6 @@ proc ::Dam::write::writeParametersEvent { } { set projectParametersDict [Dam::write::getParametersDict] write::WriteJSON $projectParametersDict - - set damSelfweight [write::getValue DamSelfweight ConsiderSelfweight] - if {$damSelfweight eq "Yes" } { - - write::OpenFile "[file tail ProjectParametersSelfWeight].json" - set projectParametersDictSelfWeight [getParametersSelfWeight] - write::WriteString [write::tcl2json $projectParametersDictSelfWeight] - write::CloseFile - - } } proc ::Dam::write::GetProblemDataDict { } { @@ -96,13 +86,6 @@ proc ::Dam::write::GetProblemDataDict { } { dict set problemDataDict time_step [write::getValue DamTimeParameters DeltaTime] dict set problemDataDict time_scale [write::getValue DamTimeParameters TimeScale] - set consider_self_weight [write::getValue DamSelfweight ConsiderSelfweight] - if {$consider_self_weight eq "Yes"} { - dict set problemDataDict consider_selfweight true - } else { - dict set problemDataDict consider_selfweight false - } - set consider_construction [write::getValue DamConstructionProcess Activate_construction] if {$consider_construction eq "Yes"} { dict set problemDataDict consider_construction true @@ -1046,105 +1029,6 @@ proc ::Dam::write::GetTransferResultsDict { } { } -# This process writes a dictionary for creating new projectparameters exclusively for solving selfweight problem -proc ::Dam::write::getParametersSelfWeight { } { - - set projectParametersDictSelfWeight [dict create] - set solversettingsDict [dict create] - dict set solversettingsDict solver_type "dam_selfweight_solver" - set modelDict [dict create] - dict set modelDict input_type "mdpa" - set model_name [file tail [GiD_Info Project ModelName]] - dict set modelDict input_filename $model_name - dict set modelDict input_file_label 0 - dict set solversettingsDict model_import_settings $modelDict - dict set solversettingsDict echo_level 1 - dict set solversettingsDict buffer_size 2 - - # We are only interested in Displacements - set nodal_part_names [write::getSubModelPartNames "DamNodalConditions" "DamSelfweight"] - set nodal_names [list ] - foreach name $nodal_part_names { - if {[string first DISPLACEMENT $name] != -1} { - lappend nodal_names $name - } - if {[string first SelfWeight $name] != -1} { - lappend nodal_names $name - } - } - dict set solversettingsDict processes_sub_model_part_list $nodal_names - - set mechanicalSolverSettingsDict [dict create] - # Adding predefined values for selfweight problem - set mechanicalSolverSettingsDict [dict merge $mechanicalSolverSettingsDict [Dam::write::predefinedParametersSelfWeight] ] - # Adding domain definitions - set mechanicalSolverSettingsDict [dict merge $mechanicalSolverSettingsDict [Dam::write::DefinitionDomains] ] - # Combination in solversetting dict - dict set solversettingsDict mechanical_solver_settings $mechanicalSolverSettingsDict - # Adding solver_settings to global dict - dict set projectParametersDictSelfWeight solver_settings $solversettingsDict - - # Adding constrains dict - set nodal_process_list [::write::getConditionsParametersDict DamNodalConditions "Nodal"] - set nodal_process_list_table_number [Dam::write::ChangeFileNameforTableid $nodal_process_list] - dict set projectParametersDictSelfWeight constraints_process_list [Dam::write::filteringConstraints $nodal_process_list_table_number] - - # Adding selfweight loads dict - set selfweight_process_list [::write::getConditionsParametersDict DamSelfweight] - set selfweight_process_list_table_number [Dam::write::ChangeFileNameforTableid $selfweight_process_list] - dict set projectParametersDictSelfWeight loads_process_list $selfweight_process_list_table_number - - return $projectParametersDictSelfWeight -} - -# Predefined solver values for selfweight problem -proc ::Dam::write::predefinedParametersSelfWeight { } { - - set solverSelfParametersDict [dict create] - dict set solverSelfParametersDict solution_type "Quasi-Static" - dict set solverSelfParametersDict strategy_type "Newton-Raphson" - dict set solverSelfParametersDict scheme_type "Newmark" - dict set solverSelfParametersDict convergence_criterion "And_criterion" - dict set solverSelfParametersDict displacement_relative_tolerance 0.0001 - dict set solverSelfParametersDict displacement_absolute_tolerance 1e-9 - dict set solverSelfParametersDict residual_relative_tolerance 0.0001 - dict set solverSelfParametersDict residual_absolute_tolerance 1e-9 - dict set solverSelfParametersDict max_iteration 10 - dict set solverSelfParametersDict echo_level 1 - dict set solverSelfParametersDict buffer_size 2 - dict set solverSelfParametersDict compute_reactions false - dict set solverSelfParametersDict reform_dofs_at_each_step false - dict set solverSelfParametersDict move_mesh_flag true - dict set solverSelfParametersDict block_builder true - dict set solverSelfParametersDict clear_storage false - dict set solverSelfParametersDict rayleigh_m 0.0 - dict set solverSelfParametersDict rayleigh_k 0.0 - dict set solverSelfParametersDict nonlocal_damage false - - set linearSolverSettingsDict [dict create] - dict set linearSolverSettingsDict solver_type "bicgstab" - dict set linearSolverSettingsDict max_iteration 200 - dict set linearSolverSettingsDict tolerance 1e-7 - dict set linearSolverSettingsDict preconditioner_type "ilu0" - dict set linearSolverSettingsDict scaling false - dict set solverSelfParametersDict linear_solver_settings $linearSolverSettingsDict - - return $solverSelfParametersDict -} - -# This process filters Nodal constraints for selfweight problem -proc ::Dam::write::filteringConstraints { processList} { - - set returnList [list ] - foreach nodalProcess $processList { - set processName [dict get $nodalProcess process_name] - if {[string first Constraint $processName] != -1} { - lappend returnList $nodalProcess - } - } - return $returnList -} - proc ::Dam::write::DevicesOutput { } { set output_state [write::getValue DamOutputState] diff --git a/kratos.gid/apps/Dam/xml/Conditions.xml b/kratos.gid/apps/Dam/xml/Conditions.xml index aa8c76878..3f4aa5bab 100644 --- a/kratos.gid/apps/Dam/xml/Conditions.xml +++ b/kratos.gid/apps/Dam/xml/Conditions.xml @@ -262,37 +262,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -171,7 +171,7 @@ - + diff --git a/kratos.gid/apps/Dam/xml/Utilities.spd b/kratos.gid/apps/Dam/xml/Utilities.spd index c0556f3e6..db4954348 100644 --- a/kratos.gid/apps/Dam/xml/Utilities.spd +++ b/kratos.gid/apps/Dam/xml/Utilities.spd @@ -1,11 +1,6 @@ - - - - - diff --git a/kratos.gid/apps/Dam/xml/XmlController.tcl b/kratos.gid/apps/Dam/xml/XmlController.tcl index 0af2867a9..a814a28f1 100644 --- a/kratos.gid/apps/Dam/xml/XmlController.tcl +++ b/kratos.gid/apps/Dam/xml/XmlController.tcl @@ -271,14 +271,6 @@ proc ::Dam::xml::ProcCheckConditionState {domNode args} { if {$TypeofProblem ni [dict get [[Model::getCondition $cond_id] getAttributes ] TypeofProblem]} {set resp 0} } - # Active part for ConsiderSelfweight if it is activated 'Yes' - if {$resp} { - if {$cond_id in [list "SelfWeight3D" "SelfWeight2D"]} { - set ConsiderSelfweight [get_domnode_attribute [$domNode selectNodes [spdAux::getRoute DamConsiderSelfweight]] v] - if {$ConsiderSelfweight ni [dict get [[Model::getCondition $cond_id] getAttributes ] ConsiderSelfweight]} {set resp 0} - } - } - # Active part for define Grouting model parts if DamActivateConstruction is activated 'Yes' if {$resp} { if {$cond_id in [list "GroutingTime2D" "GroutingTime3D"]} {