pde toolbox: how to integrate the solution only over a subdomain?
Mostrar comentarios más antiguos
Dear all!
I am solving the diffusion equation on a stacked geometry (rectangles on top of each other each with a different set of parameters); now I want to integrate the time-dependent solution (e.g. a particle density as function of time) in the lowest rectangle only. Can someone help me to understand how to integrate a solution that loves on [0 1 1 0] [0 0 5 5] only on the subdomain [0 1 1 0] [ 0 0 2 2]? I know that all sub-domains have their own label (face) and boundaries have edges but I am not sure how to access the solution on either of these?
Thank you in advance for your assistance (and wisdom...)!
Chris
Respuestas (1)
Alan Weiss
el 28 de Nov. de 2016
0 votos
Depending on your MATLAB version, you can interpolate the solution to any point you give using interpolateSolution or pdeInterpolant.
Alan Weiss
MATLAB mathematical toolbox documentation
1 comentario
Lalson Vincent
el 3 de Jun. de 2020
could you please eloborate on how to do this ? tried doing this with the below code.
fun = @(x,y,z) interpolateSolution(results,x,y,z)
q = integral3(fun,0,10,0,10,0,10)
but got the below error
Error using integral2Calc>integral2t/tensor (line 241)
Integrand output size does not match the input size.
Categorías
Más información sobre Geometry and Mesh en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!