Finding Saturation Front Position for Comparison with Experimental Data (step-21)

60 views
Skip to first unread message

aibike nagyz

unread,
Mar 25, 2025, 7:45:33 AM3/25/25
to deal.II User Group
Hello!

I’m working with step-21 in deal.II and I’m trying to perform a sensitivity analysis based on saturation front position (S_front). Specifically, I want to compare the simulated front position against experimental data by computing the absolute error in the x-position of the front at a given time.

For example, in my experimental result, the front reaches x = 5 at time t = 0.265. The simulation domain is a 2D rectangle of size 30 × 4, and I’m solving a two-phase flow problem with saturation S as one of the components.

My goal is to run simulations with different boundary pressure values and, at a specific time step (e.g., t=0.265), find the location where the saturation front exists, and compare it to the experimental position.

What would be the best practice in deal.II to compute the x-location of the saturation front at a given time? Is there a recommended way to identify front positions in a mixed system like step-21?

Any advice or pointers would be greatly appreciated. I'm happy to share snippets of my code or experiments if needed.

Thanks in advance!

Best regards,
Aibike

Aibike Nagyz

unread,
Mar 25, 2025, 7:45:35 AM3/25/25
to deal.II User Group
Hello!

I’m working with step-21 in deal.II and I’m trying to perform a sensitivity analysis based on saturation front position (S_front). Specifically, I want to compare the simulated front position against experimental data by computing the absolute error in the x-position of the front at a given time.

For example, in my experimental result, the front reaches x = 5 at time t = 0.265. The simulation domain is a 2D rectangle of size 30 × 4, and I’m solving a two-phase flow problem with saturation S as one of the components.

My goal is to run simulations with different boundary pressure values and, at a specific time step (e.g., t=0.265), find the location where the saturation front exists, and compare it to the experimental position.

What would be the best practice in deal.II to compute the x-location of the saturation front at a given time?

Any advice or pointers would be greatly appreciated. I'm happy to share snippets of my code or experiments if needed.

Daniel Arndt

unread,
Mar 25, 2025, 8:18:30 AM3/25/25
to dea...@googlegroups.com
Aibike,

I would probably just loop over all the cells and try to find the
minimum and maximum value for the saturation in that cell. Based on
that information you classify the cell as above or below the
saturation threshold and update max_x_above_saturation and
min_x_below_saturation at the same time.

Best,
Daniel
> --
> 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+un...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/dealii/9051c950-b2c1-41e2-b0e5-4d0a6232a8fdn%40googlegroups.com.

Wolfgang Bangerth

unread,
Mar 25, 2025, 10:01:13 AM3/25/25
to dea...@googlegroups.com


On 3/25/25 03:08, Aibike Nagyz wrote:
> What would be the best practice in deal.II to compute the x-location of
> the saturation front at a given time?

Aibike:
Daniel already provided a good algorithm. I would only like to add one
other thing: Oftentimes, the challenge is to come up with a good
*definition* for what you are asking for, and then the *algorithm*
becomes obvious. Here, what you need to do is to clearly define what
"saturation front" means in mathematical terms. Of course, everyone
looking at pictures knows what it means, but it's not obvious how you
would *define* in mathematical terms what a saturation front is. Once
you have defined that term concisely, it is often not so difficult to
actually implement something that does what you want to do.

Best
W.


Aibike Nagyz

unread,
Mar 27, 2025, 12:58:47 PM3/27/25
to deal.II User Group
Thank you so much!!
Reply all
Reply to author
Forward
0 new messages