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.

Mesh : resolving a part much thinner than the rest of the volumes

Please login with a confirmed email address before reporting spam

Hi,

I don't know much about the different options for meshes and their mechanism of creation. I am studying a geometry where the is a layer much thinner than the rest of the geometry. 1cm becomes 1 micrometer on this layer, where the temperature will vary very fast ( time dependent study of a few microsecondes).

I try different options without really knowing their impact. Sometimes the mesh can't be created because the smallest element size is too large and if I bring it down enough, I end up with meshes with far too many points and it slows the calculation.

Do you have any advice for me ?
For example, how could I get elements much larger in two directions than in the third one ?

Thank you very much
Simon

12 Replies Last Post 08.11.2015, 04:55 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 05.11.2015, 01:56 GMT-5
Hi

The solution probably is swept mesh, but if you could send your geometry I could have a look at it.

BR
Lasse
Hi The solution probably is swept mesh, but if you could send your geometry I could have a look at it. BR Lasse

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 05.11.2015, 03:01 GMT-5
How about this?
How about this?


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: 9 years ago 05.11.2015, 08:45 GMT-5
Hi

When you have very thin layers (ratio 1:100 or above) you could just as well use the "Thin layer" or "Thin film" (for fluids) HT Boundary condition.
These are specially made to avoid changing the mesh size by several orders of magnitude as you must when you model bulk elements. These drastic mesh changes bring you about the same level of modeling errors as the Thin Layer feature approximation. Try it out on a simple "toy model".

--
Good luck
Ivar
Hi When you have very thin layers (ratio 1:100 or above) you could just as well use the "Thin layer" or "Thin film" (for fluids) HT Boundary condition. These are specially made to avoid changing the mesh size by several orders of magnitude as you must when you model bulk elements. These drastic mesh changes bring you about the same level of modeling errors as the Thin Layer feature approximation. Try it out on a simple "toy model". -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 05.11.2015, 12:04 GMT-5
Thank you very much for your answers guys, you are really teachers for everyone here and this is great !

The swept mesh was indeed an option I didn't know about and seems to be the one I should use.

Ivar, I don't really want to use the thin layer boundary condition because :
- I want to model the temperature into this thin layer
- It is highly time-dependent (transient): way before a steady state is reached
As you said yourself in your comment on the blog : www.comsol.com/blogs/meshing-sweep-your-meshes-with-ease/ , I would lose this information if I am in a transient state and if I only have one element in the thickness.

Lasse, infortunetely I can't open your file because of your more recent version, but I will try the swept mesh and see how it works.

Thanks
Simon
Thank you very much for your answers guys, you are really teachers for everyone here and this is great ! The swept mesh was indeed an option I didn't know about and seems to be the one I should use. Ivar, I don't really want to use the thin layer boundary condition because : - I want to model the temperature into this thin layer - It is highly time-dependent (transient): way before a steady state is reached As you said yourself in your comment on the blog : https://www.comsol.com/blogs/meshing-sweep-your-meshes-with-ease/ , I would lose this information if I am in a transient state and if I only have one element in the thickness. Lasse, infortunetely I can't open your file because of your more recent version, but I will try the swept mesh and see how it works. Thanks Simon

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: 9 years ago 05.11.2015, 13:50 GMT-5
Hi

But normally such thin "layers" or domains do have little effect in the time domain, apart a temperature drop that you catches nicely with the Thin Layer. But anyhow it's worth to check these effects carefully and compare the two approaches.

Have you checked the heat diffusivity of your materials ? this should quickly tell you the mesh density, layer thickness, and time stepping that is adequate to resolve any time dependence in your heat flow

--
Good luck
Ivar
Hi But normally such thin "layers" or domains do have little effect in the time domain, apart a temperature drop that you catches nicely with the Thin Layer. But anyhow it's worth to check these effects carefully and compare the two approaches. Have you checked the heat diffusivity of your materials ? this should quickly tell you the mesh density, layer thickness, and time stepping that is adequate to resolve any time dependence in your heat flow -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 05.11.2015, 14:07 GMT-5
Indeed, I should try both because I don't much about the thin layer BC yet.

For the diffusivities, I don't have exactly fixed values because I use temperature dependent specific heats.
But to have an idea :
time study 0 to 50 µs, after 10µs usually I have 2000 or 3000 K difference between layer and far bulk
Diffusivity of layer : 9E-5
Diffusivity of bulk : 9E-6
Effusivity of layer : 1.5E4
Effusivity of bulk : 7E3
[all in SI units]

Because the power is applied by Joule heating in this layer, I have to input it as a volumic value, not as a fixed temperature at the surface or flux at the surface.
Would thin layer BC still work ?

Thank you for your interesting remarks,

Simon

Indeed, I should try both because I don't much about the thin layer BC yet. For the diffusivities, I don't have exactly fixed values because I use temperature dependent specific heats. But to have an idea : time study 0 to 50 µs, after 10µs usually I have 2000 or 3000 K difference between layer and far bulk Diffusivity of layer : 9E-5 Diffusivity of bulk : 9E-6 Effusivity of layer : 1.5E4 Effusivity of bulk : 7E3 [all in SI units] Because the power is applied by Joule heating in this layer, I have to input it as a volumic value, not as a fixed temperature at the surface or flux at the surface. Would thin layer BC still work ? Thank you for your interesting remarks, Simon

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: 9 years ago 05.11.2015, 15:20 GMT-5
Hi again

but if you layer is only 1 um across and the heat diffusivity 90E-6 [m^2/s] you should not have much a gradient across your layer even at a few usec time stepping I believe.
OK if you use it as a conducting joule heating layer you might have some skin effects still, at a few usec, I doubt you could maintain a true gradient that way, but, better to check, that is what I would have done anyhow.

To mesh such thin layer I recommend to use swept layers as these might be quite anisotropic without necessarily loose to much precision, my recommendation at least 3 across the thickness to see any effect, better if a few more, but you'll need a lot of RAM if your part is of reasonable size ;)

--
Have fun COMSOLing
Ivar
Hi again but if you layer is only 1 um across and the heat diffusivity 90E-6 [m^2/s] you should not have much a gradient across your layer even at a few usec time stepping I believe. OK if you use it as a conducting joule heating layer you might have some skin effects still, at a few usec, I doubt you could maintain a true gradient that way, but, better to check, that is what I would have done anyhow. To mesh such thin layer I recommend to use swept layers as these might be quite anisotropic without necessarily loose to much precision, my recommendation at least 3 across the thickness to see any effect, better if a few more, but you'll need a lot of RAM if your part is of reasonable size ;) -- Have fun COMSOLing Ivar

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 05.11.2015, 17:44 GMT-5
Greats remarks again !

I will try to mesh it as you say.

I am not familiar with the technique you're talking about to determine with the diffusivities the time step needed. Is it the diffusion approximation ? thickness reached = diffusivity * (time elapsed)² and it implies that one needs to use a time step smaller (how many times ?) than the time of diffusion in his geometry ? I wasn't thinking about that ! great

Simon
Greats remarks again ! I will try to mesh it as you say. I am not familiar with the technique you're talking about to determine with the diffusivities the time step needed. Is it the diffusion approximation ? thickness reached = diffusivity * (time elapsed)² and it implies that one needs to use a time step smaller (how many times ?) than the time of diffusion in his geometry ? I wasn't thinking about that ! great Simon

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: 9 years ago 06.11.2015, 01:47 GMT-5
Hi

When you solve time domain diffusion equations you should notice that for HT the heat diffusivity links the spatial to the temporal steps/discretization. Which means that if you want a given time resolution correctly modeled you need to respect a minimum spatial resolution to resolve the heat gradient to have a good convergence.
This applies typically to chemistry and their diffusion equations too, not respecting this criteria gives you negative concentrations or temperatures, which are not really "physical". Sometimes these negative values also come from the "smoothing" operations done in the plots, you can turn these off or alter these in the Plot's "Quality" tab

Check out the blog and the Forum try a search on "Nagi heat diffusivity "
or jump already to www.comsol.com/community/forums/general/thread/47331

Another way to say it is that heat diffusivity indicates the penetration depth of a critically damped heat wave into a material, for a AC heat source of frequency f0, the temperature oscillation will drop away at a distance of about Dz[m]=sqrt(alpha[m^2/s]*f0[Hz]), often the engineers multiply this by a factor of 2-3. test it out on a toy model, in 2D it's done in a few minutes with COMSOL. For the AC modulation of a heat source, the average of the oscillation is more interesting that is giving the average heat flux driver.
just think of the formula heat equation (in 1D) d/dt T(z,t) - alpha * d^2/dz^2 T(z,t)

One way (by none rigorous engineering mathematics analogy) is to say you get therefrom
alpha[m^2/s] = Delta_z^2 / Delta_t

--
Good luck
Ivar
Hi When you solve time domain diffusion equations you should notice that for HT the heat diffusivity links the spatial to the temporal steps/discretization. Which means that if you want a given time resolution correctly modeled you need to respect a minimum spatial resolution to resolve the heat gradient to have a good convergence. This applies typically to chemistry and their diffusion equations too, not respecting this criteria gives you negative concentrations or temperatures, which are not really "physical". Sometimes these negative values also come from the "smoothing" operations done in the plots, you can turn these off or alter these in the Plot's "Quality" tab Check out the blog and the Forum try a search on "Nagi heat diffusivity " or jump already to https://www.comsol.com/community/forums/general/thread/47331 Another way to say it is that heat diffusivity indicates the penetration depth of a critically damped heat wave into a material, for a AC heat source of frequency f0, the temperature oscillation will drop away at a distance of about Dz[m]=sqrt(alpha[m^2/s]*f0[Hz]), often the engineers multiply this by a factor of 2-3. test it out on a toy model, in 2D it's done in a few minutes with COMSOL. For the AC modulation of a heat source, the average of the oscillation is more interesting that is giving the average heat flux driver. just think of the formula heat equation (in 1D) d/dt T(z,t) - alpha * d^2/dz^2 T(z,t) One way (by none rigorous engineering mathematics analogy) is to say you get therefrom alpha[m^2/s] = Delta_z^2 / Delta_t -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 06.11.2015, 02:40 GMT-5
In the diffusion equation the dimensionless group

D(δt)/(δx)² must be < 0.5,

otherwise the simulation begins to oscillate. This concerns, in particular, finite difference methods but I assume it applies also to FEM.

Lasse
In the diffusion equation the dimensionless group D(δt)/(δx)² must be < 0.5, otherwise the simulation begins to oscillate. This concerns, in particular, finite difference methods but I assume it applies also to FEM. Lasse

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 06.11.2015, 17:49 GMT-5
That's great help thanks !

But in the other thread, they look on the problem from another point of view. I think they try to see what depth and what durations are involved in a physical phenomenon. For me, I have to see a specific time and need the information over specific lengths, so I have to reduce my time step, no ? For my case, isn't it more : ?
we have the equation of diffusion that physically imposes :
T study * Diffusivity = Length reached ²
and I have to use both a dx smaller than the length imposed by my T study
dx<0.5 Length reached = 0.5 sqrt ( Diffusivity * T study). I am already under
and a dt smaller than the duration imposed by my Length reached.
dt<0.5 *T to reach L needed= 0.5 * (Lneeded)²/Diffusivity. I am way above and thus I have to reduce dt a lot.

Is it the right reasoning ?

Simon
That's great help thanks ! But in the other thread, they look on the problem from another point of view. I think they try to see what depth and what durations are involved in a physical phenomenon. For me, I have to see a specific time and need the information over specific lengths, so I have to reduce my time step, no ? For my case, isn't it more : ? we have the equation of diffusion that physically imposes : T study * Diffusivity = Length reached ² and I have to use both a dx smaller than the length imposed by my T study dx

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: 9 years ago 08.11.2015, 04:55 GMT-5
Hi
Yes I believe we are saying the same thing. My point is that one must take special care in regions of high gradients of the dependent variables, something one only really sees once the model has been solved.

Anyhow one do not always need to fix very small time steps, COMSOL solver checks too and adapts, so, start rather with a coarse mesh (locally finer in critical regions), check the solver time steps used by COMSOL, refine the mesh and recheck the time steps, there is an optimum to get good results, not to make the model too heavy (mesh-wise) and not to wait too long (time iteration wise).

Then the selection of stored time steps also have some importance as your graphs get staggered if these are not adapted. I mostly use power of N=2 (N^range(start,step,stop)) or higher time increment with diffusion equations for the stored (log file "out" tagged) time steps.

--
Good luck
Ivar
Hi Yes I believe we are saying the same thing. My point is that one must take special care in regions of high gradients of the dependent variables, something one only really sees once the model has been solved. Anyhow one do not always need to fix very small time steps, COMSOL solver checks too and adapts, so, start rather with a coarse mesh (locally finer in critical regions), check the solver time steps used by COMSOL, refine the mesh and recheck the time steps, there is an optimum to get good results, not to make the model too heavy (mesh-wise) and not to wait too long (time iteration wise). Then the selection of stored time steps also have some importance as your graphs get staggered if these are not adapted. I mostly use power of N=2 (N^range(start,step,stop)) or higher time increment with diffusion equations for the stored (log file "out" tagged) time steps. -- 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.