How to write FDM matlab code for nonlocal source of the form u(1-integral u) in two dimension ?

 Respuesta aceptada

Hint:
A possible approximation for the integral over a rectangle [x(i),x(i)+dx] x [y(j),y(j)+dy] is
dx*dy*(u(i,j)+u(i,j+1)+u(i+1,j)+u(i+1,j+1))/4

5 comentarios

Thank you. If I am right, u(i,j) is discreate data so we an use $\sum_{i,j=2}^{m,n} u(i,j)*dx*dy$ Isn't it?
Yes, you must sum over all rectangles the domain is made of.
And of course, you will have to write out the integral correctly. If e.g. the domain of integration Omega is a circle in polar coordinates, you will have to write
integral over Omega u(omega) dOmega = integral_{r=0}^{r=R} integral_{theta=0}^{theta=2*pi} r*u(r,theta) dtheta dr
thus there is an additional factor r from the coordinate transformation in the integral that has to be included in the discrete form, too.
Dear Torsten,
how to run the matlab program in the excutable (eg. heat.exe) format ? in HPC cluster
I don't know. You should open a new question for that.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 24 de Mayo de 2022

Comentada:

el 23 de Abr. de 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by