Guidelines for performing a thermal analysis with PATRAN
- Analysis can be run from within PATRAN (graphical window), or in command line form by typing 'patq' in a UNIX or DOS window
- NT:
- Run patq interactively by simply typing "patq" in a DOS shell
- Patq can be run in batch mode (although you can't close the DOS shell without losing the run, you get the prompt back)
- Type "patq < patq.ses" where patq.ses (
example -- name optional) contains the commands you would give patq manually
- you can use a bash (UNIX emulator) shell if all you want to do is use auxillary options in patq, but if you want to actually run the solver you must use a DOS shell
- you can set up buttons on your toolbar to start DOS shells where you normally need to run jobs
- You can stack multiple jobs in a command file (
example) and then type (for example)
at 4pm "C:\AT_patq.cmd"
where the time and command name and location are user options
NT notes for running with ulib FORTRAN:
- combine all u*.f files into ulib.f (can be done in bash shell using 'cat u*.f > ulib.f')
- compile ulib.f in DOS shell using 'ulib ulib.f' (makes ulib.lib)
- place ulib.lib in in analysis sub-directory (or ulib.lib.apnd in top level before creating run from Patran)
- run patq from within PATRAN into identical job sub-directory name or from DOS shell
UNIX:
- To run patq in batch mode (so that that you can log out):
- Type "patq & patq.log &" where:
- patq.ses (example -- name optional) contains the commands you would give patq manually
- patq.log (name optional) is a log file that will contain all the run information
- the final "&" puts it in the background
- If you want to run more than one job, you have to guess how long the first one is going to take, and then use a command like:
(sleep 6000; patq & patq.log ) &
for the next run (where 6000 is the number of seconds you want before it starts)
Machine must have FORTRAN 77 compiler installed
To run analysis completely in PATRAN:
- You will need the PATRAN location (e.g., /mirror/msc/patranXX/bin) in your path. You will also need access to the license or license server.
- On UNIX, type "p3 &" (without quotes -- the & puts it in the background). On NT, just start by double-clicking on a db file, or on the PATRAN executable.
- Start a new database with a template that includes PATRAN THERMAL.
- If necessary, set the P/Thermal analysis preference. If you are picking up a structural model that was built from a NASTRAN only template, type "load_pthermal()" in the PATRAN window command line to load and set the P/Thermal analysis preference.
- Determine what set of units you will use -- must be internally consistent, such as SI (W, m, kg, K, sec), or English (Btu/hr, ft, lb, F, hr). Units in all the following places must be consistent:
- P3 model geometry length units -- as converted using the conversion factor in analysis menu
- P3 model material properties -- either as manually input, or as read from materials file defined in analysis menu. It will ask you for this file again if you run P/Thermal by using patq option 4.
- P3 model calculation temperature scale
- P3 model boundary conditions
- TRASYS files, as converted (if used)
- Determine your group naming convention (e.g., GEO_sidecap, FEM_sidecap, are what is often used in our branch to keep FEM and geometry separate).
- Create or import geometry
- Define materials -- Note, you can see the materials' names by using the PATRAN shareware thermal tool for viewing the materials library, but you cannot see the actual properties from there. To see properties you have to view the text file (mpid.*) in /patran/p3thermal_files/lib/. It's a good idea to check that the material property you are going to use extends over the temperature range of interest.
- Assign properties using your desired materials. Note: it is usually a good idea to assign properties and boundary conditions to the geometry, so that you can re-mesh without needing to change anything else.
- Add boundary conditions for heating and temperatures, etc.
- See section 4 of the PATRAN on-line help for specific examples.
- Most often the wisest choice will be to assign BCs on your geometry, so a re-mesh won't cause as much work.
- For time- or temperature-dependent BCs, you can either use a field, or a time-table within the BC, or define the MICRO function in an external text micro.dat.apnd file. A warning for fields -- if you use the built-in micro-functions to create your field (some of which are very useful), be VERY cautious about using the Hermite polynominal interpolation -- it can do some radical mis-interpretations of your data if you are not careful.
- To add convection or radiation to 1D bars, see the technical notes available on the subjet in the MSC.Patran knowledge base
- Mesh and equivalence.
- It is often a good idea to do all the material associations and BC applications before you mesh, because you may find places that you want to break your solids down to apply BC's, and if you have already meshed then you will have do delete and re-do the mesh.
- You can only use the IsoMesher (auto hex mesher) on "blue" (native) solids. If it's a B-rep solid (imported from Pro/E) you need to use the TetMesher.
- Don't equivalence two parts together if you have a contact resistance between them.
- It's a good ideas to make separate groups for each meshed part (e.g. FEM_part_name). Then you can have one group called All_FEM for displaying results etc.
- If a solid won't mesh, try surface meshing the outside first (then you can delete the surface mesh later).
- If a surface won't mesh how you want, try mesh seeding the edges.
- For PATRAN Thermal, you can only use the simplest element types (i.e., Tet4, Hex8, Wedge6).
- If you want a mesh to go across non-congruent geometry (such as two plates with non-matching edges), you can associate (for example) the shorter edge of one plate with the side of the other that it is touching. Then the mesh will run nicely across the interface.
- Check your BC's and materials on your mesh. This is important to make sure that your BCs are applied where you want them, and that your FEM is truly associated to the base geomety, especially if you have done anything fancy like re-associating FEM to solids.
- If you need to add user logic, see the on-line help manual and create your own ulib file from edited subroutines.
- If necessary, make any modifications to the Default load case.
- Currently, load cases are not fully available as an option for thermal analysis. Only the Default load case is used. You can, however, create a hot or cold case by selecting the BCs which go into the Default load case. For example, you can have BCs for MinQ & MaxQ. The user goes to load cases & deselects the MinQ BCs for the Max Q case & visa-versa.
- Something to note is that the PATRAN default is to add all BCs to the Default load case, and to combine them using 'Add'. This means that any BCs that touch at a boundary will be added together at that boundary. You can change this by altering the BCs in the Load Case to combining in a priority order.
- Run analysis using analysis form -- must have FORTRAN on the machine you are using. This will create nr*.nrf.* result files.
- It is best when you are going to run an analysis if you started PATRAN in the directory of the db you are going to run from. If you started PATRAN in a different directory, then closed that db and opened the one you want to run from, it will get confused about directory locations.
- If you have a micro.dat.apnd file you want it to pick up in the run, you must have at least one field in your db (can be a dummy). It will pick up mat.dat.apnd, template.dat.apnd and ulib.lib.apnd automatically. It will also pick up a convec.dat.apnd if you have one.
- In general, it is best to run in an empty directory so that files from older runs do not get used. For example, if you have only one temperature BC in an early run, and then delete that BC, the temperature BC file will still exist in the analysis sub-directory, and WILL get used if you run again into that same sub-directory, unless you go back manually and delete the files. Easiest is to always run in a new directory job name.
- If you ran a transient, you can check the times for each output step, even though they may be binary files, by doing a 'more' on the file and looking at the time definition at the top, which is in (messy) text format.
- If you are going to have a lot of runs, you can sort your result files into directories with helpful names, and still be able to view them.
- Read results and display using analysis/results forms. Use PATRAN Shareware utility for pulling in multiple files.
- If desired, create time-temperature plots using " Additional PATQ Utility Options " in patq from command line.
- If desired, edit qin.dat, mat.dat, template.dat, convec.dat, gap_convec.dat, tfix.dat, temp.dat, qbase.dat, etc. to alter variables, and then re-run using patq (from command line), options 4 and 5.
To run analysis in P/thermal that includes TRASYS orbital fluxes:
- Do everything above up through meshing and checking.
- Create a template.dat.apnd file to define your TRASYS (and P/thermal, if desired) optical surface properties.
- Apply the optical property templates to your surfaces. Make sure all the normals are pointing the way you want the active surfaces.
- Translate from P/thermal to TRASYS model. This can be done either from within PATRAN by choosing 'Output TRASYS model' on the analysis form, or (perhaps easier) from patq on the command line, once you have made a neutral file, by selecting to create a TRASYS model, in 'Additional PATQ Utility Options.' In order to have the back translation work correctly, all the files generated by the VIEWFACTOR run must be saved (see P/thermal on-line help).
- Decide if you are going to use P/Viewfactor or TRASYS for the radiation conductors. If P/Viewfactor, you will have to run the analysis for that before executing P/Thermal for thermal solution. If TRASYS, you will need to import your TRASYS Radk's, and worry about units for radiation conductors and the space node number in PATRAN (see notes below).
- If you use P/Viewfactor to calculate Radk's, it may generate some huge files when it runs, depending on the size of the model. If the model has been imported from Pro/E, you may not be able to get around this by defining symmetry planes and using similar tricks to simplify the radiative calculations.
- When running the TRASYS orbital flux subroutine QOCAL and calling QODATA, the variable QOTYPE must not be 'BOSI' (giving solar and IR broken out separately), but must be 'BOTH'.
- The translator currently translates any surface as a TRASYS 'POLY' surface type. However, if the surfaces are actually regular QUADs, search-and-replace editing can be used to change the TRASYS model file to QUADs, which will cut solution time appreciably. The results can then still be brought back into P/Thermal for solution, or can be incorporated in the translated SINDA model.
- Any editor can be used to do the search and replace to change 'POLY' to 'QUAD'; if vi is used, it can be done with
:%s/POLY/QUAD/g
- Currently, vi can be used to remove the P4 line (which needs to be done since the QUAD definition only uses three points)-- to do this (i.e., match lines beginning with 6 spaces then "P4=" and replacing to the end of the line, no matter what the rest of the line is):
:%s/^ P4.*$/C/
(where . is a single character match, * extends it to any number of characters, and $ defines that the match goes to the end of the line).
If you want to take out paragraph returns:
cat filename | egrep -v '^C' > filename.out
(where this would take out all lines beginning with C from filename, and leave the results in filename.out).
- The nedit editor can also be used.
- It's a good idea to have TRASYS output results in the unit set you would like to use in P/Thermal (using the factors in the RKDATA and QODATA lines).
- The P3Thermal TRASYS reverse translator treats TRASYS ambient (space) node radk's differently than other surface-to-surface radk's. In the forward translation to TRASYS from P3THERMAL each element number from P3THERMAL is multiplied by 10 as it is sent out to the TRASYS input deck as a surface. If the enclosure references an ambient node then that node is added in a comment card at the end of the TRASYS input deck. When you create your operations block in TRASYS you have three options with regard to numbering the SPACE node:
- The preferred option is to use "0" as the default SPACE node number; this will force TRASYS to use 32767 as the space node number. On reverse translation from TRASYS to P3THERMAL there is logic in the converter to detect incoming 32767 references and to convert those references to the original P3THERMAL ambient node number which was included in the comment card.
- The second option is to hard code "32767" as the TRASYS SPACE node number. The consequences are the same as option 1.
- The third option for numbering the SPACE node is to number it the same as your ambient node ID in P3THERMAL multiplied by 10. This will circumvent the 32767 logic and allow the reverse translator to strip the trailing "0" without mangling your original P3THERMAL space node number.
- Run TRASYS to generate orbital fluxes and radiation conductors (will get filename.bcd).
- Run translation back from TRASYS output to P/Thermal input using patq 'Additional PATQ Utility Options'.
- The translator will take all values from your one file (filename.bcd). If you are not working in Btu's, feet and hours, and you did not choose to have TRASYS output results in the units you are using in P/Thermal, then you will need to give the translator the factors you would like to use. The translator divides TRASYS heats by the factor you give it, regardless of how the wording sounds. The time multiplier you give it is used as a multiplier.
- You will get tramic.dat and traqma.dat for transient orbital heating, trqbas.dat for orbit average heating, and trarst.dat for radiation conductors (if you chose to translate them).
- It's a good idea to check these files to make sure they ended up in the units you wanted. Tramic.dat will have time vs. heat arrays, and trqbas.dat will have psuedo-static heating averages. To check the files, you will have to find the TRASYS surface(s) that relate to a particular PATRAN node. To do this, check the TRASYS input file for the surface numbers relating to a particular PATRAN node. Divide the heating on those surfaces to their respective nodes, and sum all heating to the node you want to check. Then check that value from the P/Thermal input files against what it was from the TRASYS bcd file. In other words, check that the heat on node X in the tramic.dat and trqbas.dat files is the same as it should get from the TRASYS surfaces it is associated with.
- Run P/Thermal just far enough to create a qin.dat file. To do this, in the PATRAN analysis menu, in 'Submit Options', select everything necessary in the first section, but do not select 'Execute Thermal Analysis' in the last section.
- One nicety is to create two qin.dat files, one for transient runs (say, qin_transient.dat), perhaps with a restart file name defined, and one for steady-state runs (say, qin_static.dat). You can do this by hitting Apply in the analysis form twice, each time with the parameters you want. However, you must re-name the first qin.dat you create before you hit Apply the second time, or the first qin.dat will be overwritten. If you don't know the restart file name, you can just put in a dummy name, as you will be able to edit it later. Make sure for the transient run you define the start and stop times and print interval as desired.
- Edit the qin_static.dat so that it ignores traqma.dat and tramic.dat (comment out those lines).
- If desired, run the steady-state case to create a restart file you can use for the transient run. (Normally, one would want to start a transient case from a steady-state result case in order to get a realistic transient). To run, copy qin_static.dat to qin.dat. Run patq, option 4 then option 5. You must do this in the directory where qin.dat, your trqbas.dat file, and all analysis files are located.
- Edit the qin_transient.dat to change the restart file name to be the nrf file that was created in the previous step (if necessary), and comment out the trqbas.dat line, so average heating will not interfere with the transient heating array definitions.
- Copy qin_transient.dat to qin.dat. Run the transient case (again, must be in the directory where files are located). Run patq, option 4 then option 5.
- Read results and display using analysis/results forms.
- If desired, create time-temperature plots using " Additional PATQ Utility Options " in patq from command line
- If desired, edit qin.dat, mat.dat, template.dat, convec.dat, gap_convec.dat, tfix.dat, temp.dat or qbase.dat to alter variables, and then re-run using patq (from command line), options 4 and 5.
Another way to run PATRAN Thermal analysis that includes TRASYS orbital fluxes:
Comments on these WWW pages are always welcome!
This page is maintained by Ruth M. Amundsen (r.m.amundsen@larc.nasa.gov)
Last modified on 5/17/01.
Site last reviewed: July 22, 2008.
Responsible NASA Official: Ruth M. Amundsen, Structural and Thermal Systems Branch, Systems Engineering Directorate,
Ruth.M.Amundsen@nasa.gov, (757) 864-7044
Site Curator: Ruth M. Amundsen, Structural and Thermal Systems Branch, Systems Engineering Directorate,
Ruth.M.Amundsen@nasa.gov, (757) 864-7044
Privacy Statement
Feedback on Langley Products and Services