[aspect-devel] temperature anomaly postprocessor

Wolfgang Bangerth bangerth at colostate.edu
Mon Jul 9 12:37:42 PDT 2018


Hi Max,

> I want to be able to be able to output the temperature anomaly 
> (temperature-average temperature at this depth). It looks like there are some 
> postprocessors that do similar things but nothing exactly like this. For 
> instance, the temperature-adiabatic temperature is similar, but not applicable 
> to an incompressible model, and only of limited relevance to understanding the 
> buoyancy structure in a compressible model. I do not see a way to do this in 
> VisIt either. Please let me know if this functionality already exists!
> 
> I have a question about how to implement such a postprocessor. I think that 
> what I need to do is first calculate a depth-averaged temperature (similar to 
> the calculation of depth-averaged Vs in seismic anomalies.cc) and then 
> calculate and subtract the depth-average value from each temperature value.

Yes, this sounds correct.


> If I make a new postprocessor that inherits from DataPostprocessorScalar, my 
> understanding is that evaluate_vector_field gets called on each cell, so if I 
> call get_lateral_averaging().get_temperature_averages() from within this 
> function, the code will be exceedingly slow as the depth averages would be 
> re-calculated for every cell. The only way that I can see to get around this 
> would be to calculate the depth-averaged temperature once in the 'Initialize' 
> method of my postprocessor. Do postprocessors get re-initialized each 
> timestep? If not, this would not work.

I don't think this is happening. The function that does this at each time step 
for other plugins is called 'update()', but it seems like the interface for 
visualization postprocessors does not have such a function, and in any case I 
don't see it called. It would not be terribly difficult to add, though.


> The other possibility seems to be to write something that inherits from 
> SimulatorAccess and CellDataVectorCreator, but then I will only get an average 
> temperature for each cell, which is not what I would prefer. Is there 
> something like CellDataVectorCreator that works with nodal values instead of 
> cell-centered values?

No. But you found what I would have suggested. The SeismicV*Anomalies classes 
do what you suggest, and would serve as an example to start from. If your mesh 
is fine enough, then the piecewise constant approximation is probably pretty 
good. The only thing you can't do with it is to plot isocontours/surfaces. Is 
that what you're after?

Best
  W.

-- 
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bangerth at colostate.edu
                            www: http://www.math.colostate.edu/~bangerth/



More information about the Aspect-devel mailing list