Skip to content

Commit eede39b

Browse files
fsi copy fluid timestep to structure
1 parent 7b31676 commit eede39b

4 files changed

Lines changed: 10 additions & 3 deletions

File tree

kratos.gid/apps/FSI/app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
"coordinates": "all",
5353
"materials_file": "StructuralMaterials.json",
5454
"properties_location": "json",
55-
"model_part_name": "Structure"
55+
"model_part_name": "Structure",
56+
"enable_dynamic_substepping": false
5657
},
5758
"main_launch_file": "../../exec/MainKratos.py",
5859
"examples": "examples/examples.xml"

kratos.gid/apps/FSI/write/writeProjectParameters.tcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ proc ::FSI::write::GetSolverSettingsDict { } {
9393
dict set solver_settings_dict structure_solver_settings model_import_settings input_filename [dict get $mdpa_names Structural]
9494
dict set solver_settings_dict fluid_solver_settings model_import_settings input_filename [dict get $mdpa_names Fluid]
9595

96+
# Overwrite structural timestep with fluid timestep
97+
dict set solver_settings_dict structure_solver_settings time_stepping [dict get $solver_settings_dict fluid_solver_settings time_stepping]
98+
9699
# Add the MESH_DISPLACEMENT to the gid_output process
97100
# set gid_output [lindex [dict get $FluidParametersDict output_processes gid_output] 0]
98101
# set nodalresults [dict get $gid_output Parameters postprocess_parameters result_file_configuration nodal_results]
@@ -181,6 +184,7 @@ proc ::FSI::write::InitExternalProjectParameters { } {
181184
apps::setActiveAppSoft Structure
182185
Structural::write::SetAttribute time_parameters_un FLTimeParameters
183186
write::initWriteConfiguration [Structural::write::GetAttributes]
187+
Structural::SetWriteProperty enable_dynamic_substepping [::FSI::GetWriteProperty "enable_dynamic_substepping"]
184188
set FSI::write::structure_project_parameters [Structural::write::getParametersDict]
185189

186190
apps::setActiveAppSoft FSI

kratos.gid/apps/Structural/start.tcl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
namespace eval ::Structural {
22
Kratos::AddNamespace [namespace current]
3-
3+
44
# Variable declaration
55
variable dir
66
variable _app
77

88
proc GetAttribute {name} {variable _app; return [$_app getProperty $name]}
99
proc GetUniqueName {name} {variable _app; return [$_app getUniqueName $name]}
1010
proc GetWriteProperty {name} {variable _app; return [$_app getWriteProperty $name]}
11+
proc SetWriteProperty {name value} {variable _app; return [$_app setWriteProperty $name $value]}
1112
}
1213

1314
proc ::Structural::Init { app } {
@@ -21,7 +22,7 @@ proc ::Structural::Init { app } {
2122
::Structural::write::Init
2223
}
2324

24-
# Create the old-gid condition relation_line_geo_mesh to link geometry and mesh entities.
25+
# Create the old-gid condition relation_line_geo_mesh to link geometry and mesh entities.
2526
# Topic: Local axes, beams
2627
# TODO: remove this when GiD creates this relation automatically
2728
proc ::Structural::BeforeMeshGeneration { size } {

kratos.gid/scripts/Applications.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ oo::class create App {
298298
method getUniqueName {n} {variable properties; if {[dict exists $properties unique_names $n]} {return [dict get $properties unique_names $n]} }
299299
method getUniqueNames {} {variable properties; return [dict get $properties unique_names]}
300300
method getWriteProperty {n} {variable properties; if {[dict exists $properties write $n]} {return [dict get $properties write $n]} }
301+
method setWriteProperty {n v} {variable properties; dict set properties write $n $v}
301302
method getWriteProperties {} {variable properties; return [dict get $properties write]}
302303
}
303304

0 commit comments

Comments
 (0)