Skip to content

Commit 1719687

Browse files
ñapa final
1 parent 92991d8 commit 1719687

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

kratos.gid/apps/Buoyancy/write/write.tcl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ proc ::Buoyancy::write::WriteMaterialsFile {{write_const_law True} {include_mode
5454
write::writePropertiesJsonFileDone "BuoyancyMaterials.json" $clear_mat
5555
}
5656

57-
proc ::Buoyancy::write::GetBuoyancyMaterialsFile { {write_const_law True} {include_modelpart_name True} } {
58-
set model_part_name ""
59-
if {[write::isBooleanTrue $include_modelpart_name]} {set model_part_name [GetModelPartName]}
57+
proc ::Buoyancy::write::GetBuoyancyMaterialsFile { {write_const_law True} {include_modelpart_name True} {model_part_name ""} } {
58+
59+
if {[write::isBooleanTrue $include_modelpart_name] && $model_part_name eq ""} {set model_part_name [GetModelPartName]}
6060

6161
set mats [write::getPropertiesJson [GetAttribute parts_un] $write_const_law $model_part_name]
62+
6263
# keep only first entry
6364
set clear_mat [dict get $mats properties]
6465
set clear_mat [lindex $clear_mat 0]

kratos.gid/apps/ConjugateHeatTransfer/write/write.tcl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,12 @@ proc ::ConjugateHeatTransfer::write::WriteBuoyancyMaterialsFile { {write_const_l
100100
write::writePropertiesJsonFileDone [::Fluid::write::GetAttribute materials_file] $fluid_materials
101101

102102
# Write Buoyancy materials file
103-
set buoyancy_material [::Buoyancy::write::GetBuoyancyMaterialsFile]
104-
write::writePropertiesJsonFileDone "BuoyancyMaterials.json" $buoyancy_material
103+
set buoyancy_material [::Buoyancy::write::GetBuoyancyMaterialsFile $write_const_law $include_modelpart_name FluidThermalModelPart]
104+
set clear_mat [dict get $buoyancy_material properties]
105+
set clear_mat [lindex $clear_mat 0]
106+
dict set clear_mat model_part_name FluidThermalModelPart
107+
set clear_mat [dict create properties [list $clear_mat]]
108+
write::writePropertiesJsonFileDone "BuoyancyMaterials.json" $clear_mat
105109
}
106110

107111
proc ::ConjugateHeatTransfer::write::GetAttribute {att} {

0 commit comments

Comments
 (0)