Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

PML width for Longer wavelength

Please login with a confirmed email address before reporting spam

I generally use the wavelength(in case of shorter wavelength)as the starting PML width. This does not create a large geometry to solve, saving some memory. But, my recent models have longer wavelengths. These are several magnitudes higher than the resonators actual size which I am modelling. Creating a PML as large as the wavelength does not make any sense. What could be a better way to find a starting PML width?

Thanks.

18 Replies Last Post 16 apr 2014, 10:51 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20 mar 2014, 16:35 GMT-4
Dear Ruzbeh,

there are several parameters that may help you to improve the attenuation of your PMLs:

* You can increase the PML scaling factor for a number greater than two.

* You can also choose a rational stretching type of PML, in that way the imaginary part of the stretching scale (responsible for the attenuation) is stretched out toward infinity.

I suggest you start with a thin PML using rational stretching and a scaling factor between 1.1 and 1.5. Increase the width of your PML while keeping constant the resolution of your mesh. If you see no change, then you can assume your PMLs are ok.

For further details you can read "PML Implementation" in the Comsol's documentation.

cheers,
Felipe BM
Dear Ruzbeh, there are several parameters that may help you to improve the attenuation of your PMLs: * You can increase the PML scaling factor for a number greater than two. * You can also choose a rational stretching type of PML, in that way the imaginary part of the stretching scale (responsible for the attenuation) is stretched out toward infinity. I suggest you start with a thin PML using rational stretching and a scaling factor between 1.1 and 1.5. Increase the width of your PML while keeping constant the resolution of your mesh. If you see no change, then you can assume your PMLs are ok. For further details you can read "PML Implementation" in the Comsol's documentation. cheers, Felipe BM

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21 mar 2014, 13:05 GMT-4
Dear Felipe

Thank you for the reply. One of thing I have also noticed (there is a thread about this) that COMSOL drops the lambda(wavelength) when using eigenfrequency or frequency domain analysis for polynomial PMLs.

In that case it has been suggested to use a scaling factor close to lambda of the problem one is trying to solve.

However, I have had success with rational PML and benchmarked against literature.

My current problem is a 3D one. Which is making things difficult,especially when refining the mesh.

As mentioned earlier, my previous models both yielded similar results using rational and polynomial stretching. This is beacuse I know the exact PML width to be used.

I have also tried changing the PML scaling curvature parameter.

Is there any rule of thumb for a starting PML width?

Thanks.
Dear Felipe Thank you for the reply. One of thing I have also noticed (there is a thread about this) that COMSOL drops the lambda(wavelength) when using eigenfrequency or frequency domain analysis for polynomial PMLs. In that case it has been suggested to use a scaling factor close to lambda of the problem one is trying to solve. However, I have had success with rational PML and benchmarked against literature. My current problem is a 3D one. Which is making things difficult,especially when refining the mesh. As mentioned earlier, my previous models both yielded similar results using rational and polynomial stretching. This is beacuse I know the exact PML width to be used. I have also tried changing the PML scaling curvature parameter. Is there any rule of thumb for a starting PML width? Thanks.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21 mar 2014, 13:28 GMT-4
Ruzbeh,

if you have a benchmark I wouldnt worry much for a rule of thumb. Just use any width that is acceptable for your model (for example a quarter of your wavelength). Compare it with your benchmark and then increase the width of the PML while maintaining constant the resolution and look for convergence. The only rule of thumb shall be that there is always a tradeoff between width and mesh and therefore between accuracy and computation time.

But as I told you: if you have a benchmark to compare, go ahead and give it a try with a thinner PML.

About your comment about the eigenvalue studies, an apart from the "PML Implementation" of the Comsol's documentation explain this:


In eigenfrequency studies, the typical wavelength parameter must not depend on the—unknown—frequency. When the typical wavelength is set to be obtained from a physics interface, it is therefore redefined to be equal to the PML width Δw instead. A user-defined typical wavelength applies as entered, but must not be a function of the frequency. It is often most convenient to draw and mesh the PML as if it had been part of the physical domain. To tune its effective thickness, use the scaling factor.


cheers,
Felipe BM
Ruzbeh, if you have a benchmark I wouldnt worry much for a rule of thumb. Just use any width that is acceptable for your model (for example a quarter of your wavelength). Compare it with your benchmark and then increase the width of the PML while maintaining constant the resolution and look for convergence. The only rule of thumb shall be that there is always a tradeoff between width and mesh and therefore between accuracy and computation time. But as I told you: if you have a benchmark to compare, go ahead and give it a try with a thinner PML. About your comment about the eigenvalue studies, an apart from the "PML Implementation" of the Comsol's documentation explain this: [quote] In eigenfrequency studies, the typical wavelength parameter must not depend on the—unknown—frequency. When the typical wavelength is set to be obtained from a physics interface, it is therefore redefined to be equal to the PML width Δw instead. A user-defined typical wavelength applies as entered, but must not be a function of the frequency. It is often most convenient to draw and mesh the PML as if it had been part of the physical domain. To tune its effective thickness, use the scaling factor.[/quote] cheers, Felipe BM

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 25 mar 2014, 07:42 GMT-4
Dear Felipe

Thank you again for your reply and suggestions. I have the benchmark for another type of resonator, not the one I am working on now. Using rational stretching with a good number of elements gives excellent agreement with the benchmark. Unfortunately, my current model has a large wavelength and even quarter of this makes the whole domain large enough to prevent me using good number of elements. :(

I also want to ask about the PML. Theoretically, we can tune PML by controlling the value of absorbing function. But, COMSOL's implementation of PML is slightly different from that. I am guessing scaling factor can be compared to the absorbing function.

Regarding the documentation, is it from the newest version of COMSOL?
Dear Felipe Thank you again for your reply and suggestions. I have the benchmark for another type of resonator, not the one I am working on now. Using rational stretching with a good number of elements gives excellent agreement with the benchmark. Unfortunately, my current model has a large wavelength and even quarter of this makes the whole domain large enough to prevent me using good number of elements. :( I also want to ask about the PML. Theoretically, we can tune PML by controlling the value of absorbing function. But, COMSOL's implementation of PML is slightly different from that. I am guessing scaling factor can be compared to the absorbing function. Regarding the documentation, is it from the newest version of COMSOL?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 25 mar 2014, 10:10 GMT-4
Dear Ruzbeh,

PMLs are mainly divided in two types, one stretches the imaginary part of the normal coordinate axis and the other adds an imaginary part to the normal axis of the material tensor inside the PML (UPMLs). Both are equivalent, and by the documentation of the 4.4 version (the one I'd cited in my previous message) it seems Comsol use the stretching type PMLs. So you guessed right, absorption and scaling are equivalent terms when talking about PMLs.

I will now ask a question I should have asked in the first post: Do you need to accurately determine losses/radiation?
Sometimes you can keep going without having a precise value for losses. And as you evolve your model, you elucidate a better way to determine losses. Think for a while this question before giving an answer.

If the answer is no, maybe there is no need to have a well meshed PML. Any decent PML will do the work of absorbing spurious reflections. Also you can try with scattering boundary conditions or absorbing boundary conditions that will guarantee a zero reflection condition.

If the answer is yes, then I suggest to look for a benchmark that may help with your problem. Now I can only think about a dipole antenna. In that way you will know the losses magnitude beforehand. I believe there is an example in the model gallery and also a tutorial in youtube.

In the reference at the end, Oskooi et al use this method to validate their PMLs.

Hope that helps.
Felipe.

A. Oskooi and S.G. Johnson, ``Distinguishing correct from incorrect PML proposals and a corrected unsplit PML for anisotropic, dispersive media,'' J. Computational Physics, 230, pp. 2369-2377 (2011).
Dear Ruzbeh, PMLs are mainly divided in two types, one stretches the imaginary part of the normal coordinate axis and the other adds an imaginary part to the normal axis of the material tensor inside the PML (UPMLs). Both are equivalent, and by the documentation of the 4.4 version (the one I'd cited in my previous message) it seems Comsol use the stretching type PMLs. So you guessed right, absorption and scaling are equivalent terms when talking about PMLs. I will now ask a question I should have asked in the first post: Do you need to accurately determine losses/radiation? Sometimes you can keep going without having a precise value for losses. And as you evolve your model, you elucidate a better way to determine losses. Think for a while this question before giving an answer. If the answer is no, maybe there is no need to have a well meshed PML. Any decent PML will do the work of absorbing spurious reflections. Also you can try with scattering boundary conditions or absorbing boundary conditions that will guarantee a zero reflection condition. If the answer is yes, then I suggest to look for a benchmark that may help with your problem. Now I can only think about a dipole antenna. In that way you will know the losses magnitude beforehand. I believe there is an example in the model gallery and also a tutorial in youtube. In the reference at the end, Oskooi et al use this method to validate their PMLs. Hope that helps. Felipe. A. Oskooi and S.G. Johnson, ``Distinguishing correct from incorrect PML proposals and a corrected unsplit PML for anisotropic, dispersive media,'' J. Computational Physics, 230, pp. 2369-2377 (2011).

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 27 mar 2014, 12:06 GMT-4
Dear Felipe

Thank you again for the reply. I am learning new things from you.

The coordinate stretching COMSOL uses seems a bit different from the standard ones I have seen in the literature (please see the file attached). It looks like COMSOL scales both real and imaginary part. However, I have no idea how the rational stretching works (the equation is more complicated) ! The F (comsol) and beta (standard) work as the absorbing coefficient.

I don't need exact values for losses, but I am trying to get a reasonable convergence. My model is based on solving elastic wave equation and trying to quanitfy the loss of energy through wave propagation. Since the wavelength (shear) is around 0.39m, having a PML quarter of that length makes geometry so large for computation.

Also, is there any way of calculating reflections from the PML in COMSOL while solving elastic wave equation?

Regarding the benchmark, I got two models that worked using rational stretching by using the PML length mentioned for those models in literature.

Dear Felipe Thank you again for the reply. I am learning new things from you. The coordinate stretching COMSOL uses seems a bit different from the standard ones I have seen in the literature (please see the file attached). It looks like COMSOL scales both real and imaginary part. However, I have no idea how the rational stretching works (the equation is more complicated) ! The F (comsol) and beta (standard) work as the absorbing coefficient. I don't need exact values for losses, but I am trying to get a reasonable convergence. My model is based on solving elastic wave equation and trying to quanitfy the loss of energy through wave propagation. Since the wavelength (shear) is around 0.39m, having a PML quarter of that length makes geometry so large for computation. Also, is there any way of calculating reflections from the PML in COMSOL while solving elastic wave equation? Regarding the benchmark, I got two models that worked using rational stretching by using the PML length mentioned for those models in literature.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 27 mar 2014, 13:57 GMT-4
Dear Ruzbeh,

I'm glad you are learning new things and to know that I'm being of help to you. But so far you have not tell me anything about your results. Have you tried with a thin PML? what are the results? Do try a convergence study and tell me what are your results.

I think there are not an easy way to calculate reflections of the PML using Comsol. Berenger (the father of PMLs) do have a code for that using FDTD. But I have never used it and it is more oriented to Electromagnetic Waves, which is not your case.

A good way to see if you are having spurious reflections on your PML is by observing the field inside the PML. The field amplitude must decay inside the PML until it gets around the machine error precision.

A question: you say you do not need accurate values for losses, but then you say you do need to quantify loss of energy through wave propagation. Could you please explain further on this?

cheers,
Felipe
PS. I dont have the MEMS module, but if you upload a simplified version of your model I may try to give it a look.
Dear Ruzbeh, I'm glad you are learning new things and to know that I'm being of help to you. But so far you have not tell me anything about your results. Have you tried with a thin PML? what are the results? Do try a convergence study and tell me what are your results. I think there are not an easy way to calculate reflections of the PML using Comsol. Berenger (the father of PMLs) do have a code for that using FDTD. But I have never used it and it is more oriented to Electromagnetic Waves, which is not your case. A good way to see if you are having spurious reflections on your PML is by observing the field inside the PML. The field amplitude must decay inside the PML until it gets around the machine error precision. A question: you say you do not need accurate values for losses, but then you say you do need to quantify loss of energy through wave propagation. Could you please explain further on this? cheers, Felipe PS. I dont have the MEMS module, but if you upload a simplified version of your model I may try to give it a look.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31 mar 2014, 08:28 GMT-4
Dear Felipe

I am working on the model to get some convergence. I use the SM module, I hope you will be able to have a look once I upload it.

I am calculating Q-factor for the resonator. I don't know what should be the exact value but expect it to be very large. That's why I am looking for a reasonable convergence (for PML length, Scaling factor, no. of elements). At the moment I am using the automatic mesh generation in COMSOL.

The resonator is connected to a substrate, and PML is around that substrate (i.e. substrate is considered semi-infinite compared to the resonator). Trying to absorb the propagating wave to the substrate, hence Q-factor.
Dear Felipe I am working on the model to get some convergence. I use the SM module, I hope you will be able to have a look once I upload it. I am calculating Q-factor for the resonator. I don't know what should be the exact value but expect it to be very large. That's why I am looking for a reasonable convergence (for PML length, Scaling factor, no. of elements). At the moment I am using the automatic mesh generation in COMSOL. The resonator is connected to a substrate, and PML is around that substrate (i.e. substrate is considered semi-infinite compared to the resonator). Trying to absorb the propagating wave to the substrate, hence Q-factor.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31 mar 2014, 13:39 GMT-4
I have attached a file showing a convergence curve. I have used rational stretching and varied the scale factor gradually. You can see that as SF increases the Q-factor tends to converge. My PML was of reasonable width compared to the geometry. Please have a look at it.Thanks.
I have attached a file showing a convergence curve. I have used rational stretching and varied the scale factor gradually. You can see that as SF increases the Q-factor tends to converge. My PML was of reasonable width compared to the geometry. Please have a look at it.Thanks.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31 mar 2014, 14:35 GMT-4
Ruzbeh,

I see a reasonable convergence trend. So what is your main question?

cheers,
Felipe BM
Ruzbeh, I see a reasonable convergence trend. So what is your main question? cheers, Felipe BM

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 1 apr 2014, 10:59 GMT-4
Dear Felipe,

I have got couple of questions below, which is making me confused. I hope you could help me out:

1) Selecting a decent PML width and changing the scaling factor (SF) gave a reasonable convergence. But sometimes after achieving a convergence the Q starts diverging (although not that significantly) as SF is further increased. Could this be due to spurious reflections?

2) What about the number of elements, when SF is increased? In my case I used a fixed number of elements and vaired the SF.

3) What is the purpose of PML scaling curvature parameter?

4) Since, optimal PML width may be difficult to find (when wave length is large) by varying the PML width, I chose to increase the SF instead and look for convergence. Please comment on this approach.

Thanks,
Ruzbeh
Dear Felipe, I have got couple of questions below, which is making me confused. I hope you could help me out: 1) Selecting a decent PML width and changing the scaling factor (SF) gave a reasonable convergence. But sometimes after achieving a convergence the Q starts diverging (although not that significantly) as SF is further increased. Could this be due to spurious reflections? 2) What about the number of elements, when SF is increased? In my case I used a fixed number of elements and vaired the SF. 3) What is the purpose of PML scaling curvature parameter? 4) Since, optimal PML width may be difficult to find (when wave length is large) by varying the PML width, I chose to increase the SF instead and look for convergence. Please comment on this approach. Thanks, Ruzbeh

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 1 apr 2014, 13:05 GMT-4
Dear Ruzbeh,

I have not worked coding a stretching coordinate PML, but I do have coded a UPML (imaginary part in the material tensors).

1) Working with UPMLs, if you exaggeratedly increase the PML absorption (which I believe is equivalent to increase the SF) what you will get is a PML that has a high absorption. Like a metal, therefore you will have also reflections. That may explains why your Q diverges after increasing too much the SF.

2) I believe the number of elements is your main restriction. So I see it as a good approach to fix it and increase SF instead.

3) See the documentation. "PML implementation"

The PML curvature parameter serves to relocate mesh resolution inside the PML. When there are components present which decay inside the PML much faster than the longest waves, the resolution must be increased in the zone closest to the boundary between PML and physical domain. Increasing the curvature parameter effectively moves available mesh elements toward the inner PML boundary. This is often necessary when the wave field contains a mix of different wavelengths or a mix between propagating and evanescent components.

If you increase the curvature factor, you must normally still resolve the long propagating waves sufficiently, so an overall increase of the number of mesh elements across the PML is called for.


4) That is what I will do in your case. Anyway, as I told you before, always observe the field inside the PML. The configuration that shows a soft decay of the field from one PML interface to the end of the domain, that one will be the best.

cheers,
Felipe BM
Dear Ruzbeh, I have not worked coding a stretching coordinate PML, but I do have coded a UPML (imaginary part in the material tensors). 1) Working with UPMLs, if you exaggeratedly increase the PML absorption (which I believe is equivalent to increase the SF) what you will get is a PML that has a high absorption. Like a metal, therefore you will have also reflections. That may explains why your Q diverges after increasing too much the SF. 2) I believe the number of elements is your main restriction. So I see it as a good approach to fix it and increase SF instead. 3) See the documentation. "PML implementation" [Quote]The PML curvature parameter serves to relocate mesh resolution inside the PML. When there are components present which decay inside the PML much faster than the longest waves, the resolution must be increased in the zone closest to the boundary between PML and physical domain. Increasing the curvature parameter effectively moves available mesh elements toward the inner PML boundary. This is often necessary when the wave field contains a mix of different wavelengths or a mix between propagating and evanescent components. If you increase the curvature factor, you must normally still resolve the long propagating waves sufficiently, so an overall increase of the number of mesh elements across the PML is called for.[/Quote] 4) That is what I will do in your case. Anyway, as I told you before, always observe the field inside the PML. The configuration that shows a soft decay of the field from one PML interface to the end of the domain, that one will be the best. cheers, Felipe BM

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 apr 2014, 12:08 GMT-4
Dear Felipe

Thanks for you reply. I have attached a graph of my Q-factor vs scale factor. Generally the two modes are expected to have similar Q values. But there's a difference between two Q values initially. As SF is increased further two values become similar BUT you could see the divergence of the two curves. I hope you could give some suggestion on that.

Also, how accurate are cylindrical/spherical pmls compared to rectangular ones?
Dear Felipe Thanks for you reply. I have attached a graph of my Q-factor vs scale factor. Generally the two modes are expected to have similar Q values. But there's a difference between two Q values initially. As SF is increased further two values become similar BUT you could see the divergence of the two curves. I hope you could give some suggestion on that. Also, how accurate are cylindrical/spherical pmls compared to rectangular ones?


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 apr 2014, 15:08 GMT-4
Ruzbeh,

What you show in your graph is, I suppose, the expected behavior for a PML:

If you put a low scaling factor, it is similar to put a low-absorption boundary condition. Then the outgoing waves will go in and out of your PML causing spurious reflections.

If you put a high scaling factor, it is similar to put a very-absorptive boundary condition (high conductivity) and it will behave as a metal, which will translate also in spurious reflections.

PML success, as in live, depends on having the exact amount of each ingredient... that is why PMLs are perfect :)

There are lots of papers about how to tune the PML parameters. I dont know any of them applied to the area of MEMs or Structural Mechanics, but I'm sure a simple search will lead you in that way.

If I were you, wouldn't waste more time and start using a scaling factor between 35 and 40.

good luck with your experiment,
Felipe BM
Ruzbeh, What you show in your graph is, I suppose, the expected behavior for a PML: If you put a low scaling factor, it is similar to put a low-absorption boundary condition. Then the outgoing waves will go in and out of your PML causing spurious reflections. If you put a high scaling factor, it is similar to put a very-absorptive boundary condition (high conductivity) and it will behave as a metal, which will translate also in spurious reflections. PML success, as in live, depends on having the exact amount of each ingredient... that is why PMLs are perfect :) There are lots of papers about how to tune the PML parameters. I dont know any of them applied to the area of MEMs or Structural Mechanics, but I'm sure a simple search will lead you in that way. If I were you, wouldn't waste more time and start using a scaling factor between 35 and 40. good luck with your experiment, Felipe BM

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 apr 2014, 15:13 GMT-4

Also, how accurate are cylindrical/spherical pmls compared to rectangular ones?


That depends on the geometry of your problem. For example:

If you are modeling a dipole radiation, you may want to use an spherical pml since radiation from the dipole may have a radial direction.

What is important is to exploit geometry in such a way that waves cross the PML interface as perpendicular as possible in order to increase absorption.
Felipe BM
[QUOTE] Also, how accurate are cylindrical/spherical pmls compared to rectangular ones? [/QUOTE] That depends on the geometry of your problem. For example: If you are modeling a dipole radiation, you may want to use an spherical pml since radiation from the dipole may have a radial direction. What is important is to exploit geometry in such a way that waves cross the PML interface as perpendicular as possible in order to increase absorption. Felipe BM

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 10 apr 2014, 09:31 GMT-4
Thanks Felipe for the help. I guess there will always be some reflection because of the discretization. You are right, there have not been many work on elastic waves. I have few papers on MEMS talking about PMLs where they used custom bult FE codes to solve wave equation with PML.
Thanks Felipe for the help. I guess there will always be some reflection because of the discretization. You are right, there have not been many work on elastic waves. I have few papers on MEMS talking about PMLs where they used custom bult FE codes to solve wave equation with PML.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 15 apr 2014, 16:40 GMT-4


If you put a high scaling factor, it is similar to put a very-absorptive boundary condition (high conductivity) and it will behave as a metal, which will translate also in spurious reflections.



Hi Felipe

Could you please explain this PML behaving as a metal when high absorbing function is used? Thanks.
[QUOTE] If you put a high scaling factor, it is similar to put a very-absorptive boundary condition (high conductivity) and it will behave as a metal, which will translate also in spurious reflections. [/QUOTE] Hi Felipe Could you please explain this PML behaving as a metal when high absorbing function is used? Thanks.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16 apr 2014, 10:51 GMT-4
Ruzbeh,

there are two main PML formalisms: (1) the stretching coordinate and (2) the uniaxial material (UPML).

both are equivalent, I prefer the second one (UPML) because it gives a physical insight of what happens inside the PML.

When you increase the complex part of your PML, is like increasing the conductivity of the material of the domain where the PML lies. Materials with high conductivity are conductors, and they act as reflectors when an incident (electromagnetic) wave crosses the interface. That is why most conductors are brilliant .

I suggest you read Dr. Johnson's notes on PMLs:
www-math.mit.edu/~stevenj/18.369/pml.pdf‎

cheers,
Felipe BM
Ruzbeh, there are two main PML formalisms: (1) the stretching coordinate and (2) the uniaxial material (UPML). both are equivalent, I prefer the second one (UPML) because it gives a physical insight of what happens inside the PML. When you increase the complex part of your PML, is like increasing the conductivity of the material of the domain where the PML lies. Materials with high conductivity are conductors, and they act as reflectors when an incident (electromagnetic) wave crosses the interface. That is why most conductors are brilliant . I suggest you read Dr. Johnson's notes on PMLs: www-math.mit.edu/~stevenj/18.369/pml.pdf‎ cheers, Felipe BM

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.