Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions kratos.gid/apps/Dam/write/writeProjectParameters.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,19 @@ proc ::Dam::write::GetOutputDict { {appid ""} } {

dict set resultDict plane_output [write::GetCutPlanesList Results]

dict set resultDict nodal_results [write::GetResultsList Results OnNodes]
# NODAL_YOUNG_MODULUS is the retained XML compatibility key. The actual
# historical output variable is YOUNG_MODULUS.
set historicalNodalResults [list]
foreach result [write::GetResultsList Results OnNodes] {
set outputResult $result
if {$result eq "NODAL_YOUNG_MODULUS"} {
set outputResult "YOUNG_MODULUS"
}
if {[lsearch -exact $historicalNodalResults $outputResult] < 0} {
lappend historicalNodalResults $outputResult
}
}
dict set resultDict nodal_results $historicalNodalResults
dict set resultDict gauss_point_results [write::GetResultsList Results OnElement]

dict set outputDict "result_file_configuration" $resultDict
Expand Down Expand Up @@ -744,18 +756,25 @@ proc ::Dam::write::GetVTKGidAvailabilityNote { {plural 0} } {
}

# Reuses the existing GiD nodal result selection, keeping only variables that
# are safe for the standard VTK writer.
# are safe for the standard VTK writer. NODAL_YOUNG_MODULUS is the retained XML
# compatibility key and is written as historical YOUNG_MODULUS.
proc ::Dam::write::GetVTKNodalResultsList { } {
set supportedVariables [list \
DISPLACEMENT REACTION VELOCITY ACCELERATION PRESSURE TEMPERATURE \
NODAL_REFERENCE_TEMPERATURE HEAT_FLUX FACE_HEAT_FLUX VOLUME_ACCELERATION \
POSITIVE_FACE_PRESSURE NODAL_JOINT_WIDTH Vi_POSITIVE Viii_POSITIVE]
POSITIVE_FACE_PRESSURE NODAL_JOINT_WIDTH Vi_POSITIVE Viii_POSITIVE YOUNG_MODULUS]

set gidNote [Dam::write::GetVTKGidAvailabilityNote 0]
set vtkResults [list]
foreach result [write::GetResultsList Results OnNodes] {
if {[lsearch -exact $supportedVariables $result] >= 0} {
lappend vtkResults $result
set outputResult $result
if {$result eq "NODAL_YOUNG_MODULUS"} {
set outputResult "YOUNG_MODULUS"
}
if {[lsearch -exact $supportedVariables $outputResult] >= 0} {
if {[lsearch -exact $vtkResults $outputResult] < 0} {
lappend vtkResults $outputResult
}
} else {
W "Dam VTK output: nodal result '$result' is not available for VTK output and will be omitted. $gidNote"
}
Expand Down
2 changes: 1 addition & 1 deletion kratos.gid/apps/Dam/xml/Results.spd
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<value n="NODAL_JOINT_WIDTH" pn="Nodal Joint Width" v="No" values="Yes,No" help="" state="[checkStateByUniqueName DamTypeofProblem UP_Mechanical DamTypeofProblem UP_Thermo-Mechanical DamTypeofProblem Mechanical DamTypeofProblem Thermo-Mechanical]"/>
<value n="Vi_POSITIVE" pn="Traction Principal Stress Vector" v="No" values="Yes,No" help="" state="[checkStateByUniqueName DamTypeofProblem UP_Mechanical DamTypeofProblem UP_Thermo-Mechanical DamTypeofProblem Mechanical DamTypeofProblem Thermo-Mechanical]"/>
<value n="Viii_POSITIVE" pn="Compression Principal Stress Vector" v="No" values="Yes,No" help="" state="[checkStateByUniqueName DamTypeofProblem UP_Mechanical DamTypeofProblem UP_Thermo-Mechanical DamTypeofProblem Mechanical DamTypeofProblem Thermo-Mechanical]"/>
<value n="NODAL_YOUNG_MODULUS" pn="Nodal Young Modulus" v="No" values="Yes,No" help="" state="[checkStateByUniqueName DamTypeofProblem UP_Mechanical DamTypeofProblem UP_Thermo-Mechanical DamTypeofProblem Mechanical DamTypeofProblem Thermo-Mechanical]"/>
<value n="NODAL_YOUNG_MODULUS" pn="Young's modulus (nodal field)" v="No" values="Yes,No" help="Displays the historical nodal Young's modulus field. This field must be initialized by a nodal material process, such as a spatially varying or random Young's modulus field. If Young's modulus is defined only through constant material properties, this result will normally be zero. Constant material properties are not projected to nodes." state="[checkStateByUniqueName DamTypeofProblem UP_Mechanical DamTypeofProblem UP_Thermo-Mechanical DamTypeofProblem Mechanical DamTypeofProblem Thermo-Mechanical]"/>
</container>
<container n="GiDOptions" pn="GiD options" help="GiD postprocess options" state="[HideIfUniqueName DamOutputGiD No]" open_window="0">
<value n="GiDPostMode" pn="Result format" v="GiD_PostAscii" values="GiD_PostBinary,GiD_PostAscii,GiD_PostAsciiZipped" dict="GiD_PostBinary,Binary,GiD_PostAscii,Ascii,GiD_PostAsciiZipped,Ascii zipped" help="GiD result file format" />
Expand Down