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.

Variable density of ice

Please login with a confirmed email address before reporting spam

Hi,

I have a simple block model that has dimensions of 270 meters thick by 2000 meters long. the two end boundaries are outlet, no viscous stress, the base is no slip, and the surface is stress normal force. I am trying to simulate ice flow of a material to the left and right using weakly compressible navier stokes for basic physics. The catch is, I have about 80+ meters of variable density material over the remaining 190 meters which is a constant maximum density. The analog is snow and firn resting over ice, similar to a glacier where the snow and firn increases in density with depth, until it reaches the density of ice, during which the ice is no longer compressible and hence it reaches a maximum and constant density. This requires me to set up variable density until I reach the density of ice, and then maintain a constant density with depth for the remaining depth of my block model. I have an equation that defines density with respect to depth:

density (kg/m^3) = 343.17*depth (m)^0.2199

This equation is valid until a density of 917 kg/m^3 where at, the rest of the depth of my model remains that density.

1. How can I incorporate this variable density into my block model?

I am trying to incorporate this by: options --> expressions --> subdomain expressions --> however, Im trying to figure out exactly what to type based on the equation above.

2. To account for the change from an expression to a constant density value, I have been told to try boolean expressions such as if(Density <= 917, 343.17*depth^.2199, 917). Note that I have changed the geometry terms to have X representing "distance" and y representing "depth"

I am very new to COMSOL so any help is appreciated.

Thanks


3 Replies Last Post 15 mar 2011, 19:34 GMT-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 3 mar 2011, 14:25 GMT-5
Hi

indeed, I would also have tried with an "if()" or bolean multiplication but provided that the equations remains rather "smooth" (basically derivable).

Another way is to make an interpolated function from a set of data points and call t with the "depth[1/m]" variable the unit [1/m] ensures that the units are correct and that the value provided to the function is unitless

One thing, I always suggest to respect units along the way, as this is very helpful to check that we have the correct understanding of what is happening, when to use absolute or total force, when to use force densities etc

--
Good luck
Ivar
Hi indeed, I would also have tried with an "if()" or bolean multiplication but provided that the equations remains rather "smooth" (basically derivable). Another way is to make an interpolated function from a set of data points and call t with the "depth[1/m]" variable the unit [1/m] ensures that the units are correct and that the value provided to the function is unitless One thing, I always suggest to respect units along the way, as this is very helpful to check that we have the correct understanding of what is happening, when to use absolute or total force, when to use force densities etc -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 15 mar 2011, 19:12 GMT-4
Hi Ivar,

In the subdomain for my ice flow, I was able to enter my equation for density (p) as the following:

-343.17*Y*exp(.2199)

I also incorporated the same equation into my volume force to account for driving forces (rho*gravity*depth) in the Y direction:

-9.8*(-343.17*Y*exp(.2199)) where Y is depth.

This worked well for a solution to my problem. In fact, It worked fine with incompressible navier stokes which my professor still suggested because the ice is not so much compressing as that the material has a varying density with depth.

However, I still want to incorporate an if/than booleen statement into density because ice reaches a maximum density of 917 kg/m^3 after which the density remains constant with depth. hence, I have been trying to write the following statement in the subdomain settings:

Density: if(rho_ns<=-343.17*Y*exp(.2199),-343.17*Y*exp(.2199),917)

Volume force (in the Y direction): -9.8*(if(rho_ns<=-343.17*Y*exp(0.2199),343.17*Y*exp(0.2199),917)

Unfortunately I recieve a circular variable dependancy (error:6008) message when I try to solve this model.

Im not sure quite what this means but I think it has to do with my rho_ns in the equations. What do I use for the density term? or what am I doing wrong? any ideas are helpful....

Truly greatful for any advice!


Thanks

Seth



Hi Ivar, In the subdomain for my ice flow, I was able to enter my equation for density (p) as the following: -343.17*Y*exp(.2199) I also incorporated the same equation into my volume force to account for driving forces (rho*gravity*depth) in the Y direction: -9.8*(-343.17*Y*exp(.2199)) where Y is depth. This worked well for a solution to my problem. In fact, It worked fine with incompressible navier stokes which my professor still suggested because the ice is not so much compressing as that the material has a varying density with depth. However, I still want to incorporate an if/than booleen statement into density because ice reaches a maximum density of 917 kg/m^3 after which the density remains constant with depth. hence, I have been trying to write the following statement in the subdomain settings: Density: if(rho_ns

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 15 mar 2011, 19:34 GMT-4
Hi

I believe its better to set up a function of interpolation type and call the function, then its easy to saturate the value (in fact depending on the function settings COSMOL will even look after that for you).

use matlab (or even EXCEL ;( to generate a two column text file with your data and load it into an interpolation function

Just be careful with the units as functions want unit-less "inputs" and is unit-less on "output"

--
Good luck
Ivar
Hi I believe its better to set up a function of interpolation type and call the function, then its easy to saturate the value (in fact depending on the function settings COSMOL will even look after that for you). use matlab (or even EXCEL ;( to generate a two column text file with your data and load it into an interpolation function Just be careful with the units as functions want unit-less "inputs" and is unit-less on "output" -- Good luck Ivar

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.