Hi Corbin,

> Is there a better way I could go about mapping the 3D volume data and 
> depth-averaged data to the surface mesh?

This is a tough question - other deal.II developers are trying to figure out 
how to do this in parallel here:

https://github.com/dealii/dealii/issues/10037

for now I'll assume you are doing things in serial. Collecting columns by 
material id sounds reasonable to me: GridGenerator::extrude_triangulation 
extrudes material ids so this should be pretty easy to do.

> I could probably do this with FEFaceValues, but it's unclear to me how to 
> "request" values on a top or bottom face (since element orientation is 
> general). Is there an ordering I could rely on if I know it for a single 
> element?

The simplest way to do this would be to loop across the faces find the one with 
a downward-facing normal vector and the one with an upward-facing normal 
vector. If things really are extruded in the normal way then these should be 
the second to last and last faces, respectively, but checking the normal 
vectors should always work.

In particular, if you want to use FEFaceValues, you could try looping over the 
faces of the cell and only reinitialize FEFaceValues when a face has the right 
normal vector.

Best,
David
________________________________
From: dealii@googlegroups.com <dealii@googlegroups.com> on behalf of Corbin 
Foucart <corbin.fouc...@gmail.com>
Sent: Friday, January 1, 2021 12:53 PM
To: deal.II User Group <dealii@googlegroups.com>
Subject: [deal.II] Surface / volume interactions for a 3D extruded mesh

Hello deal.ii community,

I've really enjoyed using deal.ii over the past few weeks -- it's very 
impressive how complete the software is. I'm in the process of implementing an 
ocean equations solver which has a few unusual features:

  1.  The problem is to be solved over a 3D mesh extruded downwards in depth 
from a 2D surface mesh
  2.  There is a free surface equation which makes use of the original 2D mesh
  3.  3D data is communicated to the 2D surface by integrating finite element 
fields vertically over the entire domain in depth (depth-averaged fields)
  4.  From a 3D scalar field, I will need to compute another 3D scalar field 
representing the original field integrated to depth z (like a hydrostatic 
pressure at every point in the domain)

How I was thinking of doing this:

  *   (1) Mesh the 2D region with gmsh and extrude it using the approach in 
step-49; this seems clear
  *   (2,3) I was considering holding the original 2D mesh in memory and 
creating some type of map between the top-level volume elements and the 
surface. Is there a better way I could go about mapping the 3D volume data and 
depth-averaged data to the surface mesh?
  *   (4) I can re-write the hydrostatic integrals as an ode in depth and march 
element-by-element from surface to bottom along each vertical column using a DG 
scheme.
     *   To isolate each vertical column, I could assign a material ID to each 
one
     *   However, I need to extract the value on the bottom of each element 
above as a boundary condition to the element below
     *   I could probably do this with FEFaceValues, but it's unclear to me how 
to "request" values on a top or bottom face (since element orientation is 
general). Is there an ordering I could rely on if I know it for a single 
element?

Any tips would be appreciated!

Best,
Corbin

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
dealii+unsubscr...@googlegroups.com<mailto:dealii+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/55879d8b-7ca3-4abf-b59f-9eee8b49be25n%40googlegroups.com<https://groups.google.com/d/msgid/dealii/55879d8b-7ca3-4abf-b59f-9eee8b49be25n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/BN7PR03MB435611375CA3B66F585031D3EDD20%40BN7PR03MB4356.namprd03.prod.outlook.com.

Reply via email to