File tree Expand file tree Collapse file tree
ConjugateHeatTransfer/write Expand file tree Collapse file tree Original file line number Diff line number Diff 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]
Original file line number Diff line number Diff 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
107111proc ::ConjugateHeatTransfer::write::GetAttribute {att} {
You can’t perform that action at this time.
0 commit comments