Time and space dependent boundary condtions

31 views
Skip to first unread message

Axel Loïc Giboulot

unread,
Oct 9, 2024, 5:25:47 AM10/9/24
to claw-users
Hi,

I'd like to introduce some flux in a custom boundary condition using geoclaw through bc2amr.f90.
The fluxes I want to introduce are time and space dependent, I have them as files (one file for each timestep). Where (in which fortran script) should I read the data files?

These are the two solutions I'm considering:
  • The setprob subroutine takes in no arguments so I'm guessing I would have to store all the files in a common array and then select the right values once the timestep is known in bc2amr.f90.
  • I could have used b4step but it is called after the ghost cells are set. Perhaps I could overwrite those values?
Is there any other way to do this?

Thanks for your attention,
Axel

Kyle Mandli

unread,
Oct 9, 2024, 11:48:18 AM10/9/24
to claw-users
Hi Axel,

The `setprob` routine is the right place to put that.  I would suggest using a module in lieu of a common block as well.  We do this a bunch in the code so you can see some of how we do this.  I would then modify the `bc2amr` routine as you suggested.  I recently did some experiments with boundary conditions that may also be helpful

https://github.com/mandli/boundary-tests

It also uses `setprob` to set some parameters and read in data so hopefully that at least gets you started.

Kyle
--
You received this message because you are subscribed to the Google Groups "claw-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to claw-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/claw-users/3a31a9a6-21b9-42de-ab4e-7afebbe926c3n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages