In order to calculate laminate load response from the distribution of shell forces and moments, it is sometimes also necessary to know the temperature distribution for each load case.
Example “RUBY/EX22/recoverTEMP.rb” reads the “TEMP” cards from the XDB files and stores them in an SQLite database. More precisely, function “getXdbTemperature”:
Initializes all the nodes to a default temperature for each load case:
grpNodes=db.getGroupAllNodes()
tempFields={}
hTD.each do |tempId,temp|
tempRes=Result.new
tempRes.Name="temperature"
tempRes.Format=1
tempRes.TensorOrder=0
grpNodes.each_node do |nodeId|
tempRes.insert(["NONE",nodeId],["NONE",temp])
end
tempFields[tempId]=tempRes
end
(The “TEMPD” cards are not saved in XDB file, and the default temperature for each load case must be provided by the user. In function “getXdbTemperature” the default temperatures are provided in a Hash that associates the load case integer IDs to real temperatures.)
The “SUBCASES” and “SUBCTITL” tables are also read from the XDB file. These tables allo to associate temperature fields to subcase names. Note that in the method, “TEMP(LOAD)” but not the “TEMP(INIT)”.
The method returns a hash object that associates temperature IDs to corresponding scalar results.
Method “saveResultsInSqlite” is used to save the temperature fields into a SQLite database. The table is called “element_temperatures” and associates integer keys (the Nastran temperature load ID) to BLOB objects corresponding to the temperature fields (FeResPost Result object).
These temperature fields can be used in other post-processing scripts to estimate laminate load response analysis from finite element model results. The SQLite database is here called “sqliteResults.db3”.
An example showing how the temperature fields stored in the SQLite database can be used is presented in section X.E.4