From: Sunipa Som on
Hi,
My PDE is dN/dt=-c1*dN/dr+c2*dN/dk
from that equation I am getting solution N(r,k) for a particular t. Then I tried to calculate the total number of particles for different t by
N_sum=dbl integration over 4*pi*r^2*4*pi*k^2*N(r,k) dr dk
But it is not coming constant. From time steps 1 to 5 it is decreasing and then it is constant.
Can you tell me the procedure of calculating total number of particles is correct? or any other idea?
Thank you
S Som
From: Rune Allnor on
On 28 Jun, 13:50, "Sunipa Som" <sunipa_...(a)yahoo.com> wrote:
> Hi,
> My PDE is dN/dt=-c1*dN/dr+c2*dN/dk
> from that equation I am getting solution N(r,k) for a particular t. Then I tried to calculate the total number of particles for different t  by
> N_sum=dbl integration over 4*pi*r^2*4*pi*k^2*N(r,k) dr dk
> But it is not coming constant. From time steps 1 to 5 it is decreasing and then it is constant.
> Can you tell me the procedure of calculating total number of particles is correct? or any other idea?

Much to some people's surprise, numerical computations is as
much an art as it is science.

The peoblem is that the equations might change when discretized.
What is simple to compute in exact, analytic algebra becomes
unstable when discretized and computed with finite precision.

Chances are you have stumbled across some such situation.
You might not like it, but your best chance is to find a textbook
on numerical analysis, review the methods you find there, and
apply them to your problem.

Or take a class. Or ask your boss / supervisor what to do.

Rune
From: Torsten Hennig on
> Hi,
> My PDE is dN/dt=-c1*dN/dr+c2*dN/dk
> from that equation I am getting solution N(r,k) for a
> particular t. Then I tried to calculate the total
> number of particles for different t by
> N_sum=dbl integration over 4*pi*r^2*4*pi*k^2*N(r,k)
> dr dk
> But it is not coming constant. From time steps 1 to 5
> it is decreasing and then it is constant.
> Can you tell me the procedure of calculating total
> number of particles is correct? or any other idea?
> Thank you
> S Som

Did you take into account the flux of particles
over the boundary of your domain of integration
[r;R] x [k,K] ?
N will only be constant if the total flux sums to zero.

Best wishes
Torsten.
From: Torsten Hennig on
> > Hi,
> > My PDE is dN/dt=-c1*dN/dr+c2*dN/dk
> > from that equation I am getting solution N(r,k) for
> a
> > particular t. Then I tried to calculate the total
> > number of particles for different t by
> > N_sum=dbl integration over
> 4*pi*r^2*4*pi*k^2*N(r,k)
> > dr dk
> > But it is not coming constant. From time steps 1 to
> 5
> > it is decreasing and then it is constant.
> > Can you tell me the procedure of calculating total
> > number of particles is correct? or any other idea?
> > Thank you
> > S Som
>
> Did you take into account the flux of particles
> over the boundary of your domain of integration
> [r;R] x [k,K] ?
> N will only be constant if the total flux sums to
> zero.
>

Of course if meant here:
N_sum will only be constant if the total flux over the
boundaries sums to zero.

> Best wishes
> Torsten.
From: Sunipa Som on
Torsten Hennig <Torsten.Hennig(a)umsicht.fhg.de> wrote in message <1225209501.16645.1277733046680.JavaMail.root(a)gallium.mathforum.org>...
> > > Hi,
> > > My PDE is dN/dt=-c1*dN/dr+c2*dN/dk
> > > from that equation I am getting solution N(r,k) for
> > a
> > > particular t. Then I tried to calculate the total
> > > number of particles for different t by
> > > N_sum=dbl integration over
> > 4*pi*r^2*4*pi*k^2*N(r,k)
> > > dr dk
> > > But it is not coming constant. From time steps 1 to
> > 5
> > > it is decreasing and then it is constant.
> > > Can you tell me the procedure of calculating total
> > > number of particles is correct? or any other idea?
> > > Thank you
> > > S Som
> >
> > Did you take into account the flux of particles
> > over the boundary of your domain of integration
> > [r;R] x [k,K] ?
> > N will only be constant if the total flux sums to
> > zero.
> >
>
> Of course if meant here:
> N_sum will only be constant if the total flux over the
> boundaries sums to zero.
>
> > Best wishes
> > Torsten.

Hi,
Thank you for your help. Now how do I calculate total flux for my case?
And another thing to calculate
N_sum=dbl integration over 4*pi*r^2*4*pi*k^2*N(r,k) dr dk
I am doing in this way below

N_sum=0;
for i=1:nr
for j=1:nk
N_sum=N_sum+((r(i))^2.*(k(j))^2.*N_rad(i,j));
end
end
Is it right?

With Regards,
Sunipa Som