Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Gravity modeling

Please login with a confirmed email address before reporting spam

Hi all,

I am trying to model the gravitation field due disturbances of density.
I am using the Poisson's equation for gravity

e.g. en.wikipedia.org/wiki/Poisson's_equation

Let's consider a cube with 1x1x1 meter as geometry.

Now starting comsol, I use the Poisson module, where I assign c=1,
and f=4*pi*6.67*10e-11*rho

rho defined as a toy problem
rho=1+10*(x>0.4)*(x<0.6)*(y>0.4)*(y<0.6)*(z<0.4)*(z>0.6)

Solution returns this error message:
Failed to find solution.
The relative residual is greater than the relative tolerance.

Why is that?

4 Replies Last Post 10 mai 2012, 17:46 UTC−4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18 janv. 2012, 00:53 UTC−5
Hi

I can give some guesses, but I'm not sure it's your issue:

1) meshing: have you tried to use a fine mesh and a extremely fine mesh, and compared the mesh to the expected gradient to be convinced that you resolve correctly the dependent variables and their variations.

2) scaling, in PDE mode I'm not sure COMSOL is applying any scaling (look in the log file for the values), your "f" value is very small it could be you have numerical underflow hence convergence issues. Perhaps its worth to dig into the doc about scaling. Unfortunately I do not feel comfortable enough to give you any hints which scaling factor to propose, just like that

--
Good luck
Ivar
Hi I can give some guesses, but I'm not sure it's your issue: 1) meshing: have you tried to use a fine mesh and a extremely fine mesh, and compared the mesh to the expected gradient to be convinced that you resolve correctly the dependent variables and their variations. 2) scaling, in PDE mode I'm not sure COMSOL is applying any scaling (look in the log file for the values), your "f" value is very small it could be you have numerical underflow hence convergence issues. Perhaps its worth to dig into the doc about scaling. Unfortunately I do not feel comfortable enough to give you any hints which scaling factor to propose, just like that -- Good luck Ivar

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18 janv. 2012, 04:45 UTC−5
Hi,

My guess is that the model is underconstrained, using the default zero-flux condition on all boundaries. By adding a constraint (Dirichlet boundary condition) for the dependent variable u on a boundary, for example, the model solves nicely.

Best regards,
Magnus Ringh, COMSOL
Hi, My guess is that the model is underconstrained, using the default zero-flux condition on all boundaries. By adding a constraint (Dirichlet boundary condition) for the dependent variable u on a boundary, for example, the model solves nicely. Best regards, Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18 janv. 2012, 11:28 UTC−5
Thanks for your reply.

By adding a dirichlet boundary condition (in fact a homogeneous dirichlet boundary condition, u=0) then I can get a solution. So I guess I need to find appropriate boundary conditions...

Why there is no option for infinite elements (like in the AC/DC module)?
Thanks for your reply. By adding a dirichlet boundary condition (in fact a homogeneous dirichlet boundary condition, u=0) then I can get a solution. So I guess I need to find appropriate boundary conditions... Why there is no option for infinite elements (like in the AC/DC module)?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 10 mai 2012, 17:46 UTC−4
One work-around for using infinite elements with a gravity calculation if you have the AC/DC module is to use the electrostatics physics. Since both electrostatics and gravity are governed by Poisson equations, you just need to redefine the electrical permeability of free space to be appropriate for gravity and consider charge density to be mass density and the electrical potential and field to be gravitational potential and field then you can use the electrostatics module. I did this in a paper that you can find here

www.sciencedirect.com/science/article/pii/S0098300411002901
One work-around for using infinite elements with a gravity calculation if you have the AC/DC module is to use the electrostatics physics. Since both electrostatics and gravity are governed by Poisson equations, you just need to redefine the electrical permeability of free space to be appropriate for gravity and consider charge density to be mass density and the electrical potential and field to be gravitational potential and field then you can use the electrostatics module. I did this in a paper that you can find here http://www.sciencedirect.com/science/article/pii/S0098300411002901

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.