geodynamics / aspect

A parallel, extensible finite element code to simulate convection in both 2D and 3D models.
https://aspect.geodynamics.org/
Other
227 stars 237 forks source link

Physical variables stored in "topo_vector" returned by calling dynamic topography postprocessor in geoid code #1758

Closed Shangxin-Liu closed 7 years ago

Shangxin-Liu commented 7 years ago

Hi Ian, @ian-r-rose

I noticed that in the new geoid code's dynamic topography function that directly calls dynamic topography postprocessor, "topo_vector" is the vector returned by dynamic topography postprocessor, and then "topo_values" is evaluated at each quadrature points at the cell's boundary face from that. The "topo_values" is further stored into the surface and CMB dynamic topography data.

My concern is that what physical variable that "topo_vector" stores? Is it normal deviatoric shear stress (i.e., (2 viscosity strain_rate - PI) normal_direction) or the dynamic topography in meter? It seems that it's actually normal deviatoric shear stress from your new dynamic topography postprocessor, yes? Because my geoid code requires that "surface_stored_values" and "CMB_stored_values" stores the dynamic topography values in meter unit (later in the execute template the scale of dynamic topography contribution is further calculated), it seems that I need further change my code a little bit if "topo_vector" is actually the normal deviatoric shear stress instead of dynamic topography in meter.

ian-r-rose commented 7 years ago

The dynamic topography is stored in the temperature component. The suface stress vector is stored in the vector component. Both are in the units that the rest of the model uses. Most of the time that will mean that dynamic topography is in meters. On Fri, May 19, 2017 at 6:29 PM Shangxin Liu notifications@github.com wrote:

Hi Ian, @ian-r-rose https://github.com/ian-r-rose

I noticed that in the new geoid code's dynamic topography function that directly calls dynamic topography postprocessor, "topo_vector" is the vector returned by dynamic topography postprocessor, and then "topo_values" is evaluated at each quadrature points at the cell's boundary face from that. The "topo_values" is further stored into the surface and CMB dynamic topography data.

My concern is that what physical variable that "topo_vector" stores? Is it normal deviatoric shear stress (i.e., (2viscositystrain_rate - PI) normal_direction) or the dynamic topography in meter? It seems that it's actually normal deviatoric shear stress from your new dynamic topography postprocessor, yes? Because my geoid code requires that "surface_stored_values" and "CMB_stored_values" stores the dynamic topography values in meter unit (later in the execute template the scale of dynamic topography contribution is further calculated), it seems that I need further change my code a little bit if "topo_vector" is actually the normal deviatoric shear stress instead of dynamic topography in meter.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geodynamics/aspect/issues/1758, or mute the thread https://github.com/notifications/unsubscribe-auth/AFdoN_W_L62wRPzE7ovGHNeFJxIKp0Deks5r7kIMgaJpZM4NhJzV .

Shangxin-Liu commented 7 years ago

In the dynamic topography part of geoid code, I see that you evaluate the "topo_values" from "topo_vector" by the line 239: fe_face_values[this->introspection().extractors.temperature].get_function_values(topo_vector, topo_values);

and the "topo_vector" is obtained by calling dynamic topography postprocessor in the line 170: const LinearAlgebra::BlockVector topo_vector = dynamic_topography->topography_vector();

and back to your CBF dynamic topography postprocessor:

the "topo_vector" is assigned in the line 218: topo_vector = distributed_topo_vector;

But I didn't see the place where the stress is divided by (density_contrast * gravity) before that. Can you explain this? It seems that I misunderstand or miss something. @ian-r-rose

Shangxin-Liu commented 7 years ago

Ok. Maybe I got this. I'd like to confirm with you. In your CBF dynamic topography code,

At the line 328, "distributed_topo_vector" is reassigned by true dynamic topography in meter of each face_dof_indices: *distributed_topo_vector[ face_dof_indices[i] ] = dynamic_topography (backward_advection ? -1. : 1.);**

And later in line 380 and 381, "topo_vector" is further reassigned by the true dynamic topography in meter stored in "distributed_topo_vector": distributed_topo_vector.compress(VectorOperation::insert); topo_vector = distributed_topo_vector;

Is this the way you assign the final true dynamic topography in meter to "topo_vector"? @ian-r-rose

ian-r-rose commented 7 years ago

Yes, that is right. The distributed_topo_vector is a fully distributed vector, which is used in the solve for hte CBF system. After the solve is done, we copy it into topo_vector, which is the same thing but includes locally relevant DoFs.

Shangxin-Liu commented 7 years ago

And what does the line 380 mean? distributed_topo_vector.compress(VectorOperation::insert); including the locally relevant DoFs?

In the dynamic topography part in geoid code, does the line 239
fe_face_values[this->introspection().extractors.temperature].get_function_values(topo_vector, topo_values); means the interpolation from "topo_vector" to "topo_values" of each quadrature point on the boundary face? @ian-r-rose

gassmoeller commented 7 years ago

Hi Shangxin,

line 380 makes sure that all entries for values in ghost cells are communicated correctly between processor boundaries (also see http://dealii.org/developer/doxygen/deal.II/classLinearAlgebra_1_1distributed_1_1Vector.html#a80ce97e2d5d009dd79b2366f8d93ba28).

In the dynamic topography part in geoid code, does the line 239 fe_face_values[this->introspection().extractors.temperature].get_function_values(topo_vector, topo_values); means the interpolation from "topo_vector" to "topo_values" of each quadrature point on the boundary face? @ian-r-rose

That is correct, this function evaluates the solution stored in topo_vector at the quadrature points, and stores the result in topo_values.

If this answers your question please close the issue.

Shangxin-Liu commented 7 years ago

Thanks, Rene! I think you already told me this during GRC:) @gassmoeller