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

Non linear diffusion equation #41

Open
IvanOstr opened this issue Sep 17, 2023 · 4 comments
Open

Non linear diffusion equation #41

IvanOstr opened this issue Sep 17, 2023 · 4 comments

Comments

@IvanOstr
Copy link

IvanOstr commented Sep 17, 2023

Hello guys,
Good job on the package, it seems very handy and easy to use!
Although it is not an issure per se, I would like to ask you whether this software or method can be used for non linear diffusion equations other types also.
More specifically - I have a diffusion equation of plasma with "-kn^2" added to it. I want to solve it in r or r-z using cylindrical coordinates. What type of solution would you recommend?

My equation is:
image

Thanks and good day,
Ivan

@gerlero
Copy link
Owner

gerlero commented Sep 18, 2023

@IvanOstr thanks!

Yes, I believe the method can handle the addition of such a source term (and actually, any arbitrary source term as long as it doesn't depend on $r$ or $t$ alone).

The software currently doesn't support it though. I can't promise I'll add such a feature in the short term (even though it seems nice to have it), but I'll gladly take a pull request (here and/or at https://github.com/gerlero/Fronts.jl) that adds it. If I'm doing the math right in my head, the method doesn't need the derivative of the source term; it just needs to be able to evaluate it... (EDIT: not really; the derivative is likely needed for the Jacobian)

@gerlero
Copy link
Owner

gerlero commented Sep 20, 2023

Had more time to think about this one. I'm no longer that optimistic about the feasibility of supporting a source term—or at least, an arbitrary one—, as I'm not sure how that would interact with the method's assumption that the concentration is always equal to the initial value at $r\to\infty$ for any $t$. Although, a source term that is zero at the initial value (as I believe might the case in your example) might not be affected by this... it definitely warrants more thought.

I'm guessing you have thought about this far longer than I have (for our usage I've never had to consider a source term), so please correct me if you think I might be wrong here.

@IvanOstr
Copy link
Author

Thank you very much for the responses :)
In fact I haven't gone too far thinking about this problem yet.
I think that in my case I don't mind if this assumption holds but it may not be generally true for all cases.

@gerlero
Copy link
Owner

gerlero commented Nov 4, 2023

@IvanOstr I've tried adding a source term to the equation. Unfortunately, it turns out that the Boltzmann transformation into an ODE needs a zero source term in order to be able to cancel out the $t$ factor unconditionally. Otherwise, a generic source term $F(\theta)$ yields an $F(\theta)t$ term in the ODE, which requires that $F(\theta) \equiv f(\theta)/r^2$—which is not the case in your equation—in order to get rid of that $t$ in the ODE.

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

No branches or pull requests

2 participants