Version 3 (modified by 12 years ago) ( diff ) | ,
---|
Total Objects
Total Objects can be created within the ProblemModuleInit routine in problem.f90. To create totals you first need to add two USE
statements to your problem.f90
USE Totals USE Fields
Then in ProblemModuleInit declare a variable pointer of type HistogramDef
TYPE(TotalDef), POINTER :: Total
Then create the Total and set the various parameters as in the following example
CALL CreateTotal(Total) Total%Field%id=Mass_Field Total%Field%component=GASCOMP Total%Field%name='density'
- For more information on the Field sub-object's properties see ProcessingFields
- If you are making several Totals, you can reuse the Total Pointer (with or without Nullifying it) by calling
CreateTotal(Total)
for each new histogram.
- There is also a AddAllTotals(compoennt) subroutine for adding the standard set of totals for a given component. The component can be one of
GASCOMP|PARTICLECOMP|BOTHCOMP
for totals of gas quantities, particle quantities, or combined quantities. You would think that if you had both gas and particle quantities you could add the curves in visit, but visit seems to be flaky when it comes to adding curves
Then at each process event (currently each frame) a line will be added to the out/totals.dat file
Time rho px py 0.00000000000E+00 0.75000000000E+04 -0.34672985836E+04 0.00000000000E+04 ... 0.10000000000E+00 0.86719752837E+04 -0.34942575634E+04 -0.18292629058E+04 ... 0.20000000000E+00 0.98499055019E+04 -0.35221761956E+04 -0.84551877873E+04 ... 0.30000000000E+00 0.11031993864E+05 -0.35386527324E+04 -0.18872623279E+04 ... 0.40000000000E+00 0.12214666874E+05 -0.35561063477E+04 -0.31248321010E+04 ... 0.50000000000E+00 0.13391425501E+05 -0.35668356019E+04 -0.61236261433E+04 ... 0.60000000000E+00 0.14556385221E+05 -0.35761762278E+04 -0.10025746795E+04 ... 0.70000000000E+00 0.15712779727E+05 -0.35837301939E+04 -0.14836559575E+04 ... 0.80000000000E+00 0.16867108758E+05 -0.35832110574E+04 -0.56644193139E+04 ... . . .
This .dat
file can be plotted in gnuplot
plot 'out/totals.dat' u 1:2 w l t 'rho'
Each time the simulation is restarted, new headings are added to the file. If you wish to visualize this data in visit, first the data must be transformed from a table into a list of curves using the split.s
script in the processing directory - athough the script should be run from your problem directory (not the out directory)
#rho 0.00000000000E+00 0.75000000000E+04 0.10000000000E+00 0.86719752837E+04 0.20000000000E+00 0.98499055019E+04 0.30000000000E+00 0.11031993864E+05 0.40000000000E+00 0.12214666874E+05 0.50000000000E+00 0.13391425501E+05 0.60000000000E+00 0.14556385221E+05 0.70000000000E+00 0.15712779727E+05 0.80000000000E+00 0.16867108758E+05 . . . #px 0.00000000000E+00 -0.34672985836E+04 0.10000000000E+00 -0.34942575634E+04 0.20000000000E+00 -0.35221761956E+04 0.30000000000E+00 -0.35386527324E+04 0.40000000000E+00 -0.35561063477E+04 0.50000000000E+00 -0.35668356019E+04 0.60000000000E+00 -0.35761762278E+04 0.70000000000E+00 -0.35837301939E+04 0.80000000000E+00 -0.35832110574E+04 . . .
See CurveFiles for more information on plotting curve files in visit.
Attachments (1)
- TotalsGnuPlot.png (33.5 KB ) - added by 13 years ago.
Download all attachments as: .zip