Using a data file to determine PDE coefficients

28 views
Skip to first unread message

Prashant Mital

unread,
Apr 28, 2015, 3:35:32 PM4/28/15
to dea...@googlegroups.com
Hello everyone,

So in all the examples of deal.ii that I am familiar with, a technique that is very useful and explained in excellent detail is the derivation of custom Function/TensorFunction classes that can be used as a means of defining spatially/temporally varying equation coefficients. My question arises from trying to use a code developed on deal.ii using some real-world data. In this particular application, I am dealing with darcy flow and the permeability is not defined as a function but as a set of values given at certain locations in the problem domain. This data set is quite large, and I would like to incorporate it into my simulation. However, no straightforward way of accomplishing this is self-evident from the structure of deal.ii. I am sure some users out there must have had to do something like and I was hoping someone could guide me as to how I could go about achieving this in a relatively efficient manner.

I imagine an obvious solution would be to create a derived class of Function, create a file object, read the file, pick up the required value and feed it to the program. It seems to me that this would result in enormous overhead in terms of opening and closing files each time, especially since calls to the 'value' function happen N_cells * N_quadrature_points times in one time-step. I cant imagine that being very efficient.

Prashant Mital
Graduate Student

Wolfgang Bangerth

unread,
Apr 28, 2015, 8:52:02 PM4/28/15
to dea...@googlegroups.com
Yes, that would be inefficient. You probably want to use a data scheme such as
the one we use in step-53 to interpolate data between the points at which it
is given.

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/

Prashant Mital

unread,
Apr 29, 2015, 3:52:08 PM4/29/15
to dea...@googlegroups.com
Thank you. I will have a look at Step-53.
Reply all
Reply to author
Forward
0 new messages