How to integrate over the entire bounds of a solution to a PDE at a given time step using PDEPE
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Joshua Ferrigno
am 14 Feb. 2023
Kommentiert: Joshua Ferrigno
am 15 Feb. 2023
I have a diffusion problem, solving for concentration over a spherical volume given diffusion and source terms. I'm interested in calculating the total concentraion over the entire geometry at each time step, which will then be fed into the diffusion parameter, which will then influence the next iteration.
How can I integrate over the entire geometry to find the total concentration at each time step? Do I have use PDEPE for small steps, output the solution, integrate, and restart PDEPE (similar to ODE event functions).
0 Kommentare
Akzeptierte Antwort
Torsten
am 14 Feb. 2023
Bearbeitet: Torsten
am 14 Feb. 2023
How can I integrate over the entire geometry to find the total concentration at each time step? Do I have use PDEPE for small steps, output the solution, integrate, and restart PDEPE (similar to ODE event functions).
Yes.
Or use
As far as I remember, if you define a coupling between the PDE and an artificial ODE in this code for all grid points, you get the values of the PDE in all grid points for each time step. This offers the possibility to get the total concentration.
Or assume total concentration over time, integrate, evaluate results, integrate again with the results for total concentration from the first integration, evaluate results,... and so on until convergence.
But if you have a simple 1d pde, why not discretizing in space and use ode15s to solve the resulting system of ODEs in the grid points (method-of-lines) ? Here, you have maximum flexibility.
3 Kommentare
Torsten
am 15 Feb. 2023
Bearbeitet: Torsten
am 15 Feb. 2023
If the diffusion parameter was a function of differential of the concentration at the right boundary condition, this cannot be solved alone with pdepe correct?
Correct, this information is not available inside the PDE function of "pdepe". But how can the diffusion coefficient depend on the concentration gradient at another position in space ? Or do you want to deduce the total concentration by the fluxes over the boundaries ?
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Eigenvalue Problems finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!