Handling units in ElmerGUI

The graphical user interface of Elmer
Post Reply
Flaj
Posts: 19
Joined: 27 Feb 2012, 17:00
Antispam: Yes

Handling units in ElmerGUI

Post by Flaj »

Hi,

I will try to be clear. I am currently trying to model a simple ion diffusion problem in a three-dimensional environment with some obstacles. I do not consider any compressibility and I would rather not specify a mixture density. So the equation to solve is simply dC/dt = D*Laplacian(C) where C is the concentration and D the diffusion coefficient. I will therefore use the advection-diffusion equation in its simplest form. For the 3D structure, I created one in FreeCAD and I imported the step file in ElmerGUI. A mesh was automatically created.The units of the structure built in FreeCAD were initially in mm but I think these are not taken into account when creating the mesh.

I saw in the FAQ on Elmer's website that Elmer does not assume any specific units and that the user may choose the desired units, although SI units are the usual choice. How can I specify the units for my parameter D, and perhaps for the density rho? From the ElmerModelsManual I guessed that D should be given in m2/s, by default, in ElmerGUI. Am I right? And how can I specify the size of my 3D structure (ultimately I would like to tell Elmer that the structure is 300x300x300 microns large, but I believe Elmer sees 300x300x300 arbitrary units large).

For the Material, I specified a density of 1 (I don't know what are the units actually, I just wanted to avoid specifying any). I specified a concentration diffusivity of 6e-10 m2/s. The numbers I gave for my concentrations (initial condition, and varying/steady boundary conditions) are in kg/m3, again I am not sure if it is what the solver understands. My initial condition is, for instance, 0.04812 kg/m3, so I wrote 0.04812 in the initial condition menu of ElmerGUI.

Again, my questions are as follows:

1) How can I handle the real dimensions of my 3D structure (in cubic microns) relative to the parameters choice?
2) How can I handle the units of my parameters (mainly coefficient of diffusion) and variables (concentration and time)?
3) What should I specify for the density?

Any help will be very much appreciated, thank you

Francis
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Handling units in ElmerGUI

Post by mzenker »

Hi,

my answers to your questions would be
1) If your geometry is not in meters, but e.g. in micrometers, you can do a scaling by writing
Coordinate Scaling = 1e-6
into the Simulation free text field in Model->Setup in ElmerGUI.
2) Your guesses for the units seem to be OK to me (since it's all basic SI, as you already found out ;) ). You have to pay attention on specific parameters: sometimes they are given by mass, sometimes by volume. It's usually documented in the models manual.
For your specific parameters, I don't know since I didn't simulate diffusion so far.
3) kg/m3

HTH,

Matthias

Edit: Corrected wrong keyword at 1)
Last edited by mzenker on 10 May 2012, 18:28, edited 1 time in total.
Flaj
Posts: 19
Joined: 27 Feb 2012, 17:00
Antispam: Yes

Re: Handling units in ElmerGUI

Post by Flaj »

Thank you Matthias, I'll take a look at it!
Brummig
Posts: 15
Joined: 08 May 2012, 12:42
Antispam: Yes

Re: Handling units in ElmerGUI

Post by Brummig »

I just tried Parameter Scaling = 1e-3 in the way described (I have a model in millimeters and I want the output units in SI) and Elmer complained about 1e-3 when I ran the solver. I also tried Parameter Scaling = 0.001, but Elmer just complained about 0.001. Is Parameter Scaling the right variable name?

The output value I need in SI units is capacitance. Initially I just changed the value of vacuum permittivity and got a reasonable answer (1.6pF), but then I restored the vacuum permittivity and used Elmergrid to scale my mesh by 0.001 in all three dimensions, and I got an answer of 1.4pF. Which is more valid?
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Handling units in ElmerGUI

Post by mzenker »

It is

Coordinate Scaling = 1e-3

sorry, my fault.
I have corrected it in my initial post to avoid confusion.

I don't know the answer to your 2nd question...

Matthias
Brummig
Posts: 15
Joined: 08 May 2012, 12:42
Antispam: Yes

Re: Handling units in ElmerGUI

Post by Brummig »

Thanks, Matthias, that's fixed it.
I can't repeat the capacitance calculation problem, so it looks like it was just some weirdness that crept in whilst I was playing with various settings. It's settled on 1.4pF.
Post Reply