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.
Meshing Multi-scale Problems
Posted Jun 5, 2012, 1:58 a.m. EDT Mesh Version 3.5a 14 Replies
Please login with a confirmed email address before reporting spam
I am trying to solve convection -diffusion equation for a multiscale problem in a pipe, with scale variation from nanometers near the wall to a few milimeters towards the center-line.
Because of the very fine scale near the wall, automatic free mesh generation fails. Hence I use very fine mesh near the wall to capture the nanoscale physics and the mesh becomes coarser and coarser as the pipe center-line is approached.
If I use triangular mesh with element quality between 0.7 to 1 everywhere, then there are lot of oscillations in the results and also mass is not conserved. In this case at the interface between two domains of different scales, the mesh elements at the boundary of the coarser domain conforms with the mesh elements at the boundary of finer domain.
But if I use mapped mesh, to mesh all the domains having different scales, then the boundary elements at the interfaces of two domains are not conforming with each other. A coarser element at the boundary of microscale domain is having a number of mesh vertices at its edge formed by the finer elements of the nanoscale domain.
Is this type of finite elements acceptable as these are not the standard ones?
Here the element quality is 0.017 in the nanoscale region at the wall and 0.99 everywhere else. With this meshing, mass is getting conserved and also there are no oscillations in the results. If I increase the element quality, then the result is oscillating.
Why is this happening?
Can I use mapped mesh with such poor element quality and non-conforming boundary elements, though it is giving reasonable results?
Why is free triangular mesh with high element quality giving poor results (oscillatory and mass balance error)?
Can anybody give some suggestions regarding these issues?
Regards,
Seetha
Please login with a confirmed email address before reporting spam
I believe there is no "one answer", if I have such large scale difference I make aften my domains with interiour boundaries such that I mesh the regions with different densities. Often I use boundary mesh elements with very uneven shapes, but this depends on the model.
Basically the mesh is a "sampling" of your equations, if these have a very steep gradient along Y and a small gradient along Y, you can use safely a elongated mesh, long along Y and very short along X.
The average mesh quality is for homogenious or isotropic mesh cases, a COMSOL mesh quality of 1e-5 can be perfectly OK for a highly anisotropic case provided that the linear mesh quality is respected along the different directions.
One way to check your results is to solve for mesh density of 1 and then of 2 (or 0.5) and look at the resultes, by how much do they change
When I talk about sampling, it is not only spatial sampling, but also transient, particularly in diffusion equation cases with step wise boundary conditions (often along constant temperature T or concentration C boundaries, for the rest of the environment at "0" initial conditions
For the oscillations, check the Reference guide about stabilization techniques
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Why not feed a PDE on the boundary of the pipe instead. The PDE for the boundary would then take care of the nano-scale physics.
We don't work on nano-scale problems here, but we have a similar issues when we want to model flow and transport cracks through a domain whose sizes are significantly smaller than that of the domain, for instance the embedded cracks we model are just 300 micro meter, and the domain is about 2 m. So cracks are represented as internal boundaries with convection-diffusion equation defined and properties that are unique to the cracks. In this way, we don't bother with discretising the thickness of cracks. Of course finer discretisations would be necessary close to the crack surface to get more accurate solutions, but not to the level if you would really represent a nano-scale domain. We also have problems in which flow occurs around the wall of a porous block whose velocity is several orders of magnitude higher than that of the porous matrix, for which we take the same approach.
You can see an example available in the subsurface module called "discrete-fracture".
I am not sure if this helps you.
Suresh
Please login with a confirmed email address before reporting spam
certainly a very good approach, if the phenomena is well represented by a "thin surface"
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Hi
I believe there is no "one answer", if I have such large scale difference I make aften my domains with interiour boundaries such that I mesh the regions with different densities. Often I use boundary mesh elements with very uneven shapes, but this depends on the model.
Basically the mesh is a "sampling" of your equations, if these have a very steep gradient along Y and a small gradient along Y, you can use safely a elongated mesh, long along Y and very short along X.
The average mesh quality is for homogenious or isotropic mesh cases, a COMSOL mesh quality of 1e-5 can be perfectly OK for a highly anisotropic case provided that the linear mesh quality is respected along the different directions.
One way to check your results is to solve for mesh density of 1 and then of 2 (or 0.5) and look at the resultes, by how much do they change
When I talk about sampling, it is not only spatial sampling, but also transient, particularly in diffusion equation cases with step wise boundary conditions (often along constant temperature T or concentration C boundaries, for the rest of the environment at "0" initial conditions
For the oscillations, check the Reference guide about stabilization techniques
--
Good luck
Ivar
Hi,
Thanks for your reply.
As you said rightly, the gradient of concentration along x-direction is very large as compared to that in the y-direction near the wall. So I used an elongated mesh with the mesh element width in y-direction 5000 times that in the x-direction (i.e. element aspect ration is 5000) near to the wall. Since I used mapped mesh in all domains irrespective of scale differences, the boundary elements at the interfaces of two domains are not conforming with each other. A coarser element at the boundary of microscale domain is having a number of mesh vertices at its edge formed by the finer elements of the nano-scale domain.
I tried using triangular mesh with good element quality; but the results are oscillating a lot.
I have attached here my model in 4.2a with mapped mesh. Can you please check if this type of mesh is acceptable?
Please not that there are 5 sub-domains in the model. This meshing gives non-oscillatory results.
Regards,
Seetha
Attachments:
Please login with a confirmed email address before reporting spam
Hi,
Why not feed a PDE on the boundary of the pipe instead. The PDE for the boundary would then take care of the nano-scale physics.
We don't work on nano-scale problems here, but we have a similar issues when we want to model flow and transport cracks through a domain whose sizes are significantly smaller than that of the domain, for instance the embedded cracks we model are just 300 micro meter, and the domain is about 2 m. So cracks are represented as internal boundaries with convection-diffusion equation defined and properties that are unique to the cracks. In this way, we don't bother with discretising the thickness of cracks. Of course finer discretisations would be necessary close to the crack surface to get more accurate solutions, but not to the level if you would really represent a nano-scale domain. We also have problems in which flow occurs around the wall of a porous block whose velocity is several orders of magnitude higher than that of the porous matrix, for which we take the same approach.
You can see an example available in the subsurface module called "discrete-fracture".
I am not sure if this helps you.
Suresh
Hi,
Thanks for your reply.
But actually we want to track the effect of the processes that are unique to the nano-scale region. So if I give a pde which represents the transport process inside the nanoregion as the b.c. at the boundary of microscale region, I will not be able to track what is happening in the nano-scale region. Hope I am correct.
If possible,can you please have a look at the model mesh.mph which I have attached in this thread . Is this kind of meshing acceptable?
Regards,
Seetha
Please login with a confirmed email address before reporting spam
I must admit that I have not used identity pairs in any of my problems although long time ago I did some tricks in version 3.5a to map primary variables across the domains. So please treat my crude answer here with caution.
If I am right your concern is that at the mesh interfaces the vertices do not necessarily match? But I think this is how it would be when you have the provision of identity pairs. I just opened thin layer diffusion application in the model library to see whether they have a similar situation with the meshing because they also use identity pairs in matching two 3D domains. So I guess COMSOL is capable of handling such discretisations.
I don't work in your area, but typically, we don't mix nano-scale behaviour with continuum scale simply because the latter is an averaged behaviour - of course this is the case mainly in heterogeneous materials. Your case is not of heterogeneity, so I presume that the physics of nano-scale you are feeding into the domain closest to the wall is different from that of the continuum scale. Any way just a thought.
As Ivar kindly pointed out that you definitely have to check for both spatial and temporal convergence, this is our experience especially when discrete cracks were represented as internal boundaries. In general, I always got good convergence using mapped linear elements rather than mapped quadratic elements, don't know why.
More importantly, if at all you were to use stabilization techniques, I have certainly no idea on the effect of smoothing on your results especially in the nano-scale region or at its interface where you want to capture processes rather accurately.
Suresh
Hi,
Why not feed a PDE on the boundary of the pipe instead. The PDE for the boundary would then take care of the nano-scale physics.
We don't work on nano-scale problems here, but we have a similar issues when we want to model flow and transport cracks through a domain whose sizes are significantly smaller than that of the domain, for instance the embedded cracks we model are just 300 micro meter, and the domain is about 2 m. So cracks are represented as internal boundaries with convection-diffusion equation defined and properties that are unique to the cracks. In this way, we don't bother with discretising the thickness of cracks. Of course finer discretisations would be necessary close to the crack surface to get more accurate solutions, but not to the level if you would really represent a nano-scale domain. We also have problems in which flow occurs around the wall of a porous block whose velocity is several orders of magnitude higher than that of the porous matrix, for which we take the same approach.
You can see an example available in the subsurface module called "discrete-fracture".
I am not sure if this helps you.
Suresh
Hi,
Thanks for your reply.
But actually we want to track the effect of the processes that are unique to the nano-scale region. So if I give a pde which represents the transport process inside the nanoregion as the b.c. at the boundary of microscale region, I will not be able to track what is happening in the nano-scale region. Hope I am correct.
If possible,can you please have a look at the model mesh.mph which I have attached in this thread . Is this kind of meshing acceptable?
Regards,
Seetha
Please login with a confirmed email address before reporting spam
for the mesh in "assembly" mode, indeed by default COMSOL treats each domain independently, so by default you might get different mesh nodes on the distinct up and down side of the boundary (in contrary to an union moe case where you have a common and unique boundary). If you define a continuity across the boundary pair COMSOL will interpolate to pass the flux, which means easily errors if you have a large flux and large difference in meshing densities, but such cases you shold spot if you veritfy your model carefully and then you should make the mesh denser or more homogenious.
On the other side you can always mesh one domain, and then copy the boundary mesh of two adjacent "pair meshes" with a Copy mesh (unfortunately you cannot "call" the pair Selection Definition in the copy Mesh node so you need to remake a specific Selection list per source/destination of some or all your pairs vlid for 4.2a, hopefully extended in v4.3)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
that is certainly one way, you mightconsider a geometric progression with an Element ratio greater than 1 to have an increasing mesh dimension to the next step (perhaps 10 or even 100, try)
Now I cannot say it it's OK or not because that would depend on the model and the gradients you have.
plot the gradient along a cut line on a log scale with a marker on the data points (mesh) and estimate howyour gradient is resolved. If the gradient is nicely axisymmetric probbaly it should do, the best is to double (or half) the esh density and see how the solution evolves, if greatly different (typically >5-10%) probably you should even make a denser mesh
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Hi,
I must admit that I have not used identity pairs in any of my problems although long time ago I did some tricks in version 3.5a to map primary variables across the domains. So please treat my crude answer here with caution.
If I am right your concern is that at the mesh interfaces the vertices do not necessarily match? But I think this is how it would be when you have the provision of identity pairs. I just opened thin layer diffusion application in the model library to see whether they have a similar situation with the meshing because they also use identity pairs in matching two 3D domains. So I guess COMSOL is capable of handling such discretisations.
I don't work in your area, but typically, we don't mix nano-scale behaviour with continuum scale simply because the latter is an averaged behaviour - of course this is the case mainly in heterogeneous materials. Your case is not of heterogeneity, so I presume that the physics of nano-scale you are feeding into the domain closest to the wall is different from that of the continuum scale. Any way just a thought.
As Ivar kindly pointed out that you definitely have to check for both spatial and temporal convergence, this is our experience especially when discrete cracks were represented as internal boundaries. In general, I always got good convergence using mapped linear elements rather than mapped quadratic elements, don't know why.
More importantly, if at all you were to use stabilization techniques, I have certainly no idea on the effect of smoothing on your results especially in the nano-scale region or at its interface where you want to capture processes rather accurately.
Suresh
Hi
Thanks for your reply. The physics in the nano-scale region is different from that in the continuum scale. My concern is some of the nodes at the interfaces are matching. But many nodes of the nano-scale region at the interface exist between two nodes of the continuum-scale region at the interface. Hope I am able to convey my doubt properly.
But as Ivar said, if COMSOL is capable of interpolating the fluxes from the continuum-scale elements to the nodes of the nano-scale region at the interface, then it will be fine.
Regards,
Seetha
Please login with a confirmed email address before reporting spam
Hi
that is certainly one way, you mightconsider a geometric progression with an Element ratio greater than 1 to have an increasing mesh dimension to the next step (perhaps 10 or even 100, try)
Now I cannot say it it's OK or not because that would depend on the model and the gradients you have.
plot the gradient along a cut line on a log scale with a marker on the data points (mesh) and estimate howyour gradient is resolved. If the gradient is nicely axisymmetric probbaly it should do, the best is to double (or half) the esh density and see how the solution evolves, if greatly different (typically >5-10%) probably you should even make a denser mesh
--
Good luck
Ivar
Hi
Thanks for the reply.
The concentration gradient across the interface is rather axisymmetric. But the gradient on the domain to the left of interface is a little flat where as that on the right of interface is steeper. Hence at the interface it is just varying smoothly to fit the gradient on both sides of the interface. Is this what you meant?
Regards,
Seetha
Please login with a confirmed email address before reporting spam
Hello Ivar,
I also have this kind of question. As following:
How to create different kinds of meshes in different districts in different parts of the geometry? For examples, I want to create finer meshes in the inlet channel, but I do not need create such finer meshes in the main channel. Or some parts of the geometry need boundary layer meshes, and some do not need. How can I do that? I should create these different parts as separated topological structures and not unite them as a whole unit?
If I create different meshes to different parts of the geometry, how can the interface of different parts be continuous with considering the physical continuation. I had seen an example from video, they used the "convert" method to solve this problem. But if I united these two parts as a whole unit before I created meshes, I could not use the convert method.
Please help me......Thank you!
Hi
I believe there is no "one answer", if I have such large scale difference I make aften my domains with interiour boundaries such that I mesh the regions with different densities. Often I use boundary mesh elements with very uneven shapes, but this depends on the model.
Basically the mesh is a "sampling" of your equations, if these have a very steep gradient along Y and a small gradient along Y, you can use safely a elongated mesh, long along Y and very short along X.
The average mesh quality is for homogenious or isotropic mesh cases, a COMSOL mesh quality of 1e-5 can be perfectly OK for a highly anisotropic case provided that the linear mesh quality is respected along the different directions.
One way to check your results is to solve for mesh density of 1 and then of 2 (or 0.5) and look at the resultes, by how much do they change
When I talk about sampling, it is not only spatial sampling, but also transient, particularly in diffusion equation cases with step wise boundary conditions (often along constant temperature T or concentration C boundaries, for the rest of the environment at "0" initial conditions
For the oscillations, check the Reference guide about stabilization techniques
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
you can add different mesh nodes, and add for each a mesh Size sub node and define in several steps, convert your default "physics induced" mesh into a user mesh (check the doc, its worth to read it carefully, I agree it takes some time but there are so much to learn in the beginning, the only way is to start ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Hi
you can add different mesh nodes, and add for each a mesh Size sub node and define in several steps, convert your default "physics induced" mesh into a user mesh (check the doc, its worth to read it carefully, I agree it takes some time but there are so much to learn in the beginning, the only way is to start ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
when I say doc its the PDF of COMSOL I refer to in v4.3 its > 60 Mb (and I do not have all options from far), several tousands pages to read, in 3.5 they are also there, and they were complete for that version
--
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.
Suggested Content
- BLOG This Just In: COMSOL Multiphysics 4.3b
- KNOWLEDGE BASE Failed to respect boundary element on geometry face
- FORUM Meshing problems
- FORUM Meshing over large changes in scale
- FORUM meshing problems