Hello veryone, I am interested in the diffusion of particles inside a sphere, and its release through a small pore on the sphere surface. Unfortunately, I have not found the way to do this in R. Could you help me? Thank very much in advance for your help
Hi, You need to be a lot more specific about what you want. Are you trying to solve a partial differential equation (PDE) in time and space, in spherical coordinates? Do you have a closed form solution that provides the values of the dependent variable (e.g. concentration or temperature) as a function of time and location? If so, it is a simple matter of writing an R function to compute that and plot the results or do whatever you want to do with the result. If there is no closed form solution to the PDE, then you have to solve it numerically using finite-differencing coupled with a time-marching scheme such as Euler's or Runge-Kutta schemes. Hope this helps, Ravi. ____________________________________________________________________ Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvaradhan at jhmi.edu ----- Original Message ----- From: carferper at alum.us.es Date: Thursday, October 22, 2009 9:45 am Subject: [R] Diffusion of particles inside a sphere To: r-help at r-project.org> Hello veryone, > > I am interested in the diffusion of particles inside a sphere, and its > release through a small pore on the sphere surface. Unfortunately, I > have not found the way to do this in R. Could you help me? > > Thank very much in advance for your help > > ______________________________________________ > R-help at r-project.org mailing list > > PLEASE do read the posting guide > and provide commented, minimal, self-contained, reproducible code.
carferper wrote:> > Hello veryone, > > I am interested in the diffusion of particles inside a sphere, and its > release through a small pore on the sphere surface. Unfortunately, I have > not found the way to do this in R. Could you help me? > > Thank very much in advance for your help > >I have used R for very similar types of simulations involving the movement of groundwater through porous media-- so R definitely has all the tools to set up and solve these types of models. It also makes it easy to obtain nice plots of the solution. However, if you are asking "Is there a ready-made model for situation X?" the answer is most likely "No, you will have to build it yourself". At the minimum you will need to: * Define the governing equation that describes the situation you are modeling. * Define any initial or boundary conditions that apply to the situation. * Choose an appropriate numerical or analytical solution method to solve the governing equation subject to the initial and boundary conditions. At that point, you may have questions such as "Are there any packages that implement numerical/analytical method Y?" or "I am trying to implement numerical/analytical scheme Y in R, but it isn't working because the calculation of Z appears to be wrong. Can you help?". These sorts of questions are specific enough that the members of this list could probably offer advice on how to implement the nuts and bolts of the operations. Good luck! -Charlie ----- Charlie Sharpsteen Undergraduate Environmental Resources Engineering Humboldt State University -- View this message in context: http://www.nabble.com/Diffusion-of-particles-inside-a-sphere-tp26010166p26015673.html Sent from the R help mailing list archive at Nabble.com.