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.

Automatic remeshing depending upon the gradient of the solution

Please login with a confirmed email address before reporting spam

Hello, everyone,
I am solving a nonlinear equation on the plane. Its solution, u=u(x,y) is everywhere close to zero except for some region in the vicinity of the coordinate origin. This region is not necessarily small. Within this region u(x,y) is almost everywhere close to a constant, say, 1. The object of interest is the transition region, its cross-section representing a kink. The problem consists of finding its configuration and thickness.

My difficulty is that the size, L, of the whole region, where u is close to 1, is much larger that the width, d, of the kink. L/d is about few hundreds and may reach 1000 in some cases.

The problem requires, therefore, to use a mesh which is coarse away from the kink, but is at least about 100 times finer in its close vicinity.

I have no idea of how to achieve that. Please take into account that a priori the contour of the kink region is unknown. It can only be established by solving the equation. I tried to solve the equation first on the coarse mesh, and then to apply the Refine Mesh option to the region where the coarse solution exhibits the kink, but it did not work when I fixed the factor of refinement to 10 (let along 100). Besides, this approach is very time-consuming.

Is there a way to instruct Comsol to adaptively vary the mesh size in the course of solving, the variations being dependent upon the gradient of the function u?

Is it possible in to instruct it to decrease the mesh size about 100 times in such an approach? If 100 times is too much, what would be the limitation?

Thank you.

5 Replies Last Post 8 févr. 2013, 11:11 UTC−5
Josh Thomas Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 7 févr. 2013, 11:42 UTC−5
Alexei-

COMSOL has the capability of doing Adaptive Mesh Refinement during the solution process. COMSOL will remesh in areas where the residual error is greatest (usually in regions of highest solution gradients). There are a number of settings available including the ability to specify a maximum number of re-meshings as well as a maximum number of elements.

I would recommend doing a documentation search on "Adaptive Mesh Refinement" for detail on all the settings that are possible.

Regards,
Josh Thomas
AltaSim Technologies
Alexei- COMSOL has the capability of doing Adaptive Mesh Refinement during the solution process. COMSOL will remesh in areas where the residual error is greatest (usually in regions of highest solution gradients). There are a number of settings available including the ability to specify a maximum number of re-meshings as well as a maximum number of elements. I would recommend doing a documentation search on "Adaptive Mesh Refinement" for detail on all the settings that are possible. Regards, Josh Thomas AltaSim Technologies

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 févr. 2013, 07:10 UTC−5
Thank you, Josh,

I had a look at the Help/Adaptive Mesh Refinement, as you advised. I still cannot unsderstang the thing completely. My equation is time-dependent. The refinement I want to achieve is in the spatial mesh, not in the time steps. The time steps may also be refined, but most important is the mesh in the geometry. As much as I understand the Help, if the Adaptive Mesh Refinement is used with the time-dependent solver, the refinement concerns the time stepping. As much as I could see the Help article says nothing on the refinement of the mesh in space. Am I right, or I misunderstood something?
Thank you, Josh, I had a look at the Help/Adaptive Mesh Refinement, as you advised. I still cannot unsderstang the thing completely. My equation is time-dependent. The refinement I want to achieve is in the spatial mesh, not in the time steps. The time steps may also be refined, but most important is the mesh in the geometry. As much as I understand the Help, if the Adaptive Mesh Refinement is used with the time-dependent solver, the refinement concerns the time stepping. As much as I could see the Help article says nothing on the refinement of the mesh in space. Am I right, or I misunderstood something?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 févr. 2013, 07:16 UTC−5
Dear Josh,

Thank you. I had a look into the Help/Adaptive Mesh Refinement as you advised. I still have a misunderstanding after reading it. The point is that my equation is time-dependent. In the Help there is the application of the Adaptive Mesh Refinement together with time-dependent solvers, but in this case all settings seem to only concern the time-stepping properties. I need the spatial mesh refinement, rather than the time-stepping. Time stepping refinement may also take place or may not, but the spatial mesh is important. Did I get something wrong?
Dear Josh, Thank you. I had a look into the Help/Adaptive Mesh Refinement as you advised. I still have a misunderstanding after reading it. The point is that my equation is time-dependent. In the Help there is the application of the Adaptive Mesh Refinement together with time-dependent solvers, but in this case all settings seem to only concern the time-stepping properties. I need the spatial mesh refinement, rather than the time-stepping. Time stepping refinement may also take place or may not, but the spatial mesh is important. Did I get something wrong?

Josh Thomas Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 févr. 2013, 10:47 UTC−5
Alexei-

Mesh refinement is always going to be in the spatial domain because the FE mesh discretizes space -- even if you are solving a time dependent problem. Any "time" settings for this functionality are going to relate to how time might affect this spatial mesh refinement process.

The benefit of adaptive mesh refinement for time-dependent solutions is that you don't have to have refined mesh everywhere in space. You can have a relatively coarse mesh and then let the adaptive algorithm refine the high gradient regions. These regions, of course, may move in time and so the refined regions will "track" along with them. This is the benefit.

If you have the CFD module or the Microfluidics module, you have access to a nice example model and step-by-step instructions that uses time-dependent adaptive mesh refinement. It is called "Inkjet Nozzle -- Level Set".

Best regards,
Josh Thomas
AltaSim Technologies
Alexei- Mesh refinement is always going to be in the spatial domain because the FE mesh discretizes space -- even if you are solving a time dependent problem. Any "time" settings for this functionality are going to relate to how time might affect this spatial mesh refinement process. The benefit of adaptive mesh refinement for time-dependent solutions is that you don't have to have refined mesh everywhere in space. You can have a relatively coarse mesh and then let the adaptive algorithm refine the high gradient regions. These regions, of course, may move in time and so the refined regions will "track" along with them. This is the benefit. If you have the CFD module or the Microfluidics module, you have access to a nice example model and step-by-step instructions that uses time-dependent adaptive mesh refinement. It is called "Inkjet Nozzle -- Level Set". Best regards, Josh Thomas AltaSim Technologies

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 févr. 2013, 11:11 UTC−5
Thank you very much. Alexei
Thank you very much. Alexei

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.