-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PML boundary condition #210
base: master
Are you sure you want to change the base?
Conversation
To incorporate PML abc we should probably have a list of `damp` func. For now I get error: `ValueError('Default `damp(x, y)` is incompatible with other args as `x_size=65`, while `x_size=200` is expected. Perhaps you forgot to override `damp(x, y)`?')`
I'm still struggling with this error.
|
You need to make sure that JUDI.jl/src/pysource/models.py Line 260 in 83752f1
Contains your pml field or it will use the ones from EmptyModel which is a tiny model only used to create the operator |
`abc_type` may be either `damp` or `pml`. This option defines the boundary condition. `pml` kernel equations not yet implemented. It only prepares now `pmlx0,pmlx1,pmly0...` `Model` member vars. Thogh the function `pml_op` should be checked carefully if it is implemented correctly
@mloubout I ve added I'm not sure whether I correctly implemented Model.pml_op() method. I have some troubles with implementing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the abc_type should go in Model, like NHL, rather than the options
Both `nb` and `abc_type` are defined in `DiscreteGrid` structure
Done, |
What's the main blocker? |
@mloubout basically I think it is better if I push my efforts with mistakes and then we discuss it. I will do that soon (I need few days). But ultimately I can't understand the following: for acoustic media PML abc are defined using these three equations: And further I don't know yet what are PML equations for scalar/Q-factor/VTI/TTI models. |
yes it would return a list of three equations instead of one |
For `pml` abc it needs to add few more equations with `phi` var
@mloubout hi, From the Devito PML example I have to implement In Devito example they are defined as follows: phi1 = TimeFunction(name="phi1",grid=grid,time_order=2,space_order=2,staggered=(x,z),dtype=np.float64)
phi2 = TimeFunction(name="phi2",grid=grid,time_order=2,space_order=2,staggered=(x,z),dtype=np.float64) but as I see we don't set any values to them even if in the Devito examples it is written about these vars: "auxiliary variables, which will be non zero only in the absorption region" Am I missing something or I can simply define them as |
Yes this is expected, these are just extra state variables for the PML region, similar to the wavefield 'u |
@mloubout some new obstacles appeared... I define phi as Model attributes: self.phi1 = TimeFunction(name="phi1",grid=self.grid,time_order=2,space_order=2,staggered=self.grid.dimensions)
self.phi2 = TimeFunction(name="phi2",grid=self.grid,time_order=2,space_order=2,staggered=self.grid.dimensions) I have a feeling that I have to add them to Operator so they were compiled. If so what should be the right hand side? After that I will have to compute something like |
Not sure what you mean, these are just objects, the operator just generates the code for the equations you define with it https://nbviewer.org/github/devitocodes/devito/tree/master/examples/seismic/abc_methods/ For some example of oimplementation |
I tried this today. It works well for implementing damping boundary conditions. Thank you all. |
What I did here is:
And yet to implement in That was pretty difficult for me so I stopped this PR for the now. |
3d45d45
to
0148d00
Compare
Current implementation of damping boundary condition requires greately extending the computational area.
I hope PML do that better.
To incorporate PML abc we should probably have a list of
damp
func.As a first step I'm trying to leave current implementation of
damp_op
function but makeModel.damp
member as list.With that I currently get error:
ValueError('Default
damp(x, y)is incompatible with other args as
x_size=65, while
x_size=200is expected. Perhaps you forgot to override
damp(x, y)?')
The example of PML in Devito
Appreciate any help