pde toolbox: how to integrate the solution only over a subdomain?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Antworten (1)
Alan Weiss
am 28 Nov. 2016
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 Kommentar
Lalson Vincent
am 3 Jun. 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.
Siehe auch
Kategorien
Mehr zu Boundary Conditions finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!