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.
Moving mesh with automatic remeshing
Posted Jun 6, 2017, 3:13 p.m. EDT 9 Replies
Please login with a confirmed email address before reporting spam
I am new to COMSOL. I have successfully run a stationary study with coupled laminar flow, nernst planck and electrostatics. For a time dependent study I am trying to use a moving mesh to move an object with the velocity calculated in between studies. I have refined my mesh pretty much but it is giving inverted elements. The velocity value calculated is also correct. For the Automatic remeshing: it is showing "Condition for remeshing fulfilled for initial time". Please help.
Thanks.
Payel
Please login with a confirmed email address before reporting spam
1) Use adaptive meshing instead of automatic remeshing.
2) Turn down the mesh quality required for remeshing (initially set to 0.2 -- try lower quality and see if you can get it to go past the first iteration).
3) Set your system up so that it is closer to convergence from the start. (Though it sounds like this might not be your issue given the workflow you describe).
4) I suspect finer mesh will not help, but it's something else you could try.
Please login with a confirmed email address before reporting spam
In addition to following Jame's instructions, try to change the condition for remeshing to "distortion". Note that by default, "mesh quality " is selected. Set it to a small value (like 0.01, zero indicates no distortion). This way, it is more probable that you get your results since the mesh distortion is zero as the simulation starts, regardless of the mesh configuration which satisfies the meshing criteria at t=0 and helps convergence.
Amin,
Please login with a confirmed email address before reporting spam
I changed the mesh quality to 0.01 and it worked.
Thank you very much.
Payel
Please login with a confirmed email address before reporting spam
As suggested, I reduced the quality and the simulation ran. But after a certain time it is giving inverted mesh again and is not getting remeshed. Is it because it is above the given quality but there are few elements inverted? How to avoid this error?
Can you please help. Thanks.
Payel
Please login with a confirmed email address before reporting spam
1) The mesh is too coarse for the geometry. Make it a couple steps finer (though this can make the model much slower).
2) The velocity is too high for the time steps being chosen. Try setting the time steps to "strict" under Time Dependent Solver -> Time Stepping."
3) Also, you might decrease the "Relative Tolerance" under Time Dependent -> Study Settings. I have read that the default value of 0.01 is too high for accurate results and that it should be decreased FAR below that for some models (0.0001 or even less -- but I'd try 0.001 first). This might sound counter-intuitive but I think the idea is that by requiring higher accuracy at each step, you prevent errors from propagating through subsequent time steps.
Hope this helps!
James
Please login with a confirmed email address before reporting spam
As I suggested in my previous post, try to change the remeshing criteria to "distortion" and set it to a very small value. Inverted mesh element appears when the element is distorted very much. By controlling this parameter, the warning disappears. However, the simulation takes longer to converge as the number of remeshing steps increases by doing this.
My experience with remeshing is in contrast with what James suggested about changing the mesh size.
I think using finer meshes worsens the situation and leads to lower element quality.
Amin,
Please login with a confirmed email address before reporting spam
I have tried keeping the distortion factor lower (0.01). But in that case it shows the same problem " condition for remeshing fulfilled for initial time".
Any idea why?
Thanks for your suggestions.
Payel
Please login with a confirmed email address before reporting spam
If you've already tried this, I don't know. The only other thought that comes to mind is to perhaps try adaptive meshing in place of automatic remeshing. My observation has been that adaptive meshing is slower, but at least in some cases can substitute for automatic remeshing. (I confess to not really understanding the difference so if anyone would like to explain, that would be great).
Please login with a confirmed email address before reporting spam
Try smaller values of distortion (i.e. 1e-3, 1e-4, until you see simulation starts running). It doesn't make sense to me though, since you said it was working without remeshing. If the problem was due to setting a large value for the remeshing criteria, it should still work without taking any remeshing steps since the condition has not been fulfilled yet.
Anyway,
Also try remeshing manually at a very early time like 1e-6 sec and see if it works. See the attached file.
Amin,
Attachments:
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 Model Translational Motion with the Deformed Mesh Interfaces
- KNOWLEDGE BASE How to recover your work from an interrupted simulation
- BLOG COMSOL Multiphysics v4.2 New Features Video
- FORUM Moving Mesh, CFD and automatic remeshing
- BLOG Modeling Free Surfaces in COMSOL Multiphysics® with Moving Mesh