Skip to content
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

Divergence for higher orders using Pseudo-spectral projection #402

Open
hamzabuw opened this issue Jan 3, 2023 · 3 comments
Open

Divergence for higher orders using Pseudo-spectral projection #402

hamzabuw opened this issue Jan 3, 2023 · 3 comments
Labels

Comments

@hamzabuw
Copy link

hamzabuw commented Jan 3, 2023

Hi Jonathan,

I am trying to use projection method to quantify uncertainty in mass output (as mass loss rate) due to uncertainty in activation energy (E) using Arrhenius equation:
image

Up till order 4 of PCE, I get a reasonable result as below:
image
The shaded region in blue is the standard deviation.

But from order 5 on, the solution diverges as below:
image

I used truncated normal distribution to generate quadrature as below:

E_1_exact = 188E+03
E_variation = 0.02
E_alpha = chaospy.Normal(E_1_exact, E_variation*E_1_exact)
E_alpha = chaospy.Trunc(E_alpha, lower= E_1_exact -2*E_variation*E_1_exact,upper= E_1_exact+ 2*E_variation*E_1_exact)
gauss_quads = chaospy.generate_quadrature(order, joint, rule="gaussian")

Can you guide me why does the solution diverge from order 5 on? I am experiencing similar issue with other variables even without using the truncation.

@jonathf
Copy link
Owner

jonathf commented Jan 12, 2023

Could you try using chaospy.TruncNormal instead of composing with chaospy.Normal and chaospy.Trunc? I suspect numerical instabilities in the truncation approximation.

@hamzabuw
Copy link
Author

Chaospy.TruncNormal creates undefined weights for me using the code below:
E_1_exact = 188E+03
E_variation = 0.02
E_alpha = chaospy.TruncNormal(lower= E_1_exact -2*E_variation*E_1_exact, upper= E_1_exact+ 2*E_variation*E_1_exact, mu=E_1_exact, sigma=E_variation*E_1_exact)
gauss_quads = chaospy.generate_quadrature(order, joint)

But even without truncation and just using normal distribution, I am unable to reach higher order even though the weights appear to be well defined.

@jonathf
Copy link
Owner

jonathf commented Jan 12, 2023

Then that is not it. I don't have all information available about your problem, so I can only suggest ideas of what is wrong.

I have two other hypothesis hat can be tested.

  1. You order is too low. Try to increase it.

  2. The equation hints at a latent log-normal probability distribution. Log-normal is one of those distributions that behaves really bad with polynomial chaos expansion. In that case, you are out of luck, as the problem is inherently not stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants