[aspect-devel] temperature anomaly postprocessor

Max Rudolph maxrudolph at ucdavis.edu
Mon Jul 9 13:25:57 PDT 2018


Wolfgang,
Thank you for your response!

On Mon, Jul 9, 2018 at 12:37 PM Wolfgang Bangerth <bangerth at colostate.edu>
wrote:

>
> 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.
>

I think that adding such a function is probably the best approach. Right
now, if you wanted to, for instance, save depth averages, calculate a
temperature anomaly, and calculate seismic velocities, the depth average
postprocessor would be called three times. If instead there were a way to
ensure that the depth averages had been updated for the current timestep
and then simply retrieve them as needed, this would be ideal. I would
prefer I guess to add an .update() function to the postprocessors. I would
also modify the depth_averages postprocessor so that it will return a 1D
interpolating function that can be queried similar to
.get_temperature_averages() but perhaps .get_temperature_at_depth(double
depth). Does this seem OK?


> > 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?
>

I want to be able to plot the actual buoyancy structure, so need to
calculate either temperature-mean temperature or density-mean density. I
guess that 'plan C' would be to write some scripts that read the depth
averages and .vtu or .h5 files and calculate the desired quantity as a
post-processing step but this seems inefficient.


> Best
>   W.
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth          email:                 bangerth at colostate.edu
>                             www: http://www.math.colostate.edu/~bangerth/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20180709/74775e33/attachment.html>


More information about the Aspect-devel mailing list