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:
1 decade ago
7 nov 2012, 13:27 GMT-5
Hi
thebasic principle of the mesh in FEm is to sample your variable field such that you resolve the filed variations (Gradients), you you should check the wavelnegth of your frequencies in the ground, and check that you have enough elements (ideally 5 better 10 or more) across one wavelengh in the material. Thne, as you have a skin depth, in the region where the wave vanishess you need a dense mesh across this decaying value, this is often obtained with a "boundary" type mesh
Sometimes on must resolve the problem once, check the results and the meshing, refine the mesh where needed and resolve, and start again, a few, times
--
Good luck
Ivar
Hi
thebasic principle of the mesh in FEm is to sample your variable field such that you resolve the filed variations (Gradients), you you should check the wavelnegth of your frequencies in the ground, and check that you have enough elements (ideally 5 better 10 or more) across one wavelengh in the material. Thne, as you have a skin depth, in the region where the wave vanishess you need a dense mesh across this decaying value, this is often obtained with a "boundary" type mesh
Sometimes on must resolve the problem once, check the results and the meshing, refine the mesh where needed and resolve, and start again, a few, times
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
9 nov 2012, 09:21 GMT-5
Thank you Ivar,
I have checked my the mesh for skin depth, and in effect I did not consider this problem for low frequency but only for the higher, so thank you.
But the problem still remain. In particular it look strange to me that the solution converge for higher frequency and not for lower one ( with the same mesh!). So I think that too many degree of freedom, if not necessary (it is the case of lower frequency) are a problem, is it?
I also think I could use different mesh for each frequancy of study.
Then, to achieving convergence I shall set 0.1 for relative tolerance of stationary solver , for the lower frequencies(but for the lower one also so BICGStab explodes) , and 0.05 for the higher ones. I don't know how decide if this values are acceptable.
I think also that the problem in convergence may be a problem of mesh quality( but if it is so wouldn't I have this problem at all frequency and not only at lower ones?). I have a few (two or three)thin layers in my model (at earth top). About 200 m thicness, very thick with respect to model dimension of about 50 Km *50 Km * 100 Km (100 Km is the total earth thickness in my model). So I used swept mesh in the thin layer s (triangular or quadrangular I thin is the same) and free tetrahedral in the other part, but in this way mesh quality is no more than 0.3 -0.4 and minimun mesh element quality can be very low, 10^-8!
I read in some thread that i could use direct solver if quality mesh is low, is it ?
Best regards,
Patrizia
Thank you Ivar,
I have checked my the mesh for skin depth, and in effect I did not consider this problem for low frequency but only for the higher, so thank you.
But the problem still remain. In particular it look strange to me that the solution converge for higher frequency and not for lower one ( with the same mesh!). So I think that too many degree of freedom, if not necessary (it is the case of lower frequency) are a problem, is it?
I also think I could use different mesh for each frequancy of study.
Then, to achieving convergence I shall set 0.1 for relative tolerance of stationary solver , for the lower frequencies(but for the lower one also so BICGStab explodes) , and 0.05 for the higher ones. I don't know how decide if this values are acceptable.
I think also that the problem in convergence may be a problem of mesh quality( but if it is so wouldn't I have this problem at all frequency and not only at lower ones?). I have a few (two or three)thin layers in my model (at earth top). About 200 m thicness, very thick with respect to model dimension of about 50 Km *50 Km * 100 Km (100 Km is the total earth thickness in my model). So I used swept mesh in the thin layer s (triangular or quadrangular I thin is the same) and free tetrahedral in the other part, but in this way mesh quality is no more than 0.3 -0.4 and minimun mesh element quality can be very low, 10^-8!
I read in some thread that i could use direct solver if quality mesh is low, is it ?
Best regards,
Patrizia
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:
1 decade ago
9 nov 2012, 14:11 GMT-5
Hi
my experience is that the mesh quality is an average value and it's evaluated in an isotropic way, which in certain cases is not that representative. I always imagine that my mesh is a "digital" sampling of the dependent variables, and in particular also the first derivative of the dependent variables. This means that thin layers with any gradient across them require at least 3 elements in the thickness, if the gradient is low in the traverse direction even 1 element can track the solution, but this tells you also that a "thin hysics boundary layer can do as well if not cheaper.
Then you should also consider the way any gradients appear, ofthen the vary in one direction and little in the two others, in these cases you need a short mesh in the direction of the flow, but you can have quite large elements transverse to the flow (gradient) direction, this can give rather low "mesh quality" values, but still give good results.
Another criteria is how many warning of the type "inverted mesh elements, linear discretisation used ..." you get, a few in non critical regions is mostly OK many or in rcitical regions (hig gradients/fluxes are severe warnings, indications for mesh improvements. Now I do not like mesh quality below 1e-3, so if you have much smaller you should take a second look on these critical regions (you can plot them with the mesh quality factor, check the doc)
Often structured mesh can have a low quality, as these miht have 2 "large" directions and a very short one.
A last comment is to use auto refinement, here COMSOL analysis the regions where the mesh quality and the solver errors are theworse and it triesto improve the mesh locally. In v3 I did not find the algorithm very efficient, compared to other FEM tools I had used (the meshing imprvement ws to general and not concentrating on local regions) but this might have been improved snce, I have just not tried it out, as mostly the automatic mesh gives an excellent starting point.
A relative resolution for the solver, means you cannot really trust many digits of your results, at least not in critical regions, the question is how to best identify where the solver is more or less precise, since the convergence criteria is a global identifier. That one I would also appreciate to learn more about ;)
--
Good luck
Ivar
Hi
my experience is that the mesh quality is an average value and it's evaluated in an isotropic way, which in certain cases is not that representative. I always imagine that my mesh is a "digital" sampling of the dependent variables, and in particular also the first derivative of the dependent variables. This means that thin layers with any gradient across them require at least 3 elements in the thickness, if the gradient is low in the traverse direction even 1 element can track the solution, but this tells you also that a "thin hysics boundary layer can do as well if not cheaper.
Then you should also consider the way any gradients appear, ofthen the vary in one direction and little in the two others, in these cases you need a short mesh in the direction of the flow, but you can have quite large elements transverse to the flow (gradient) direction, this can give rather low "mesh quality" values, but still give good results.
Another criteria is how many warning of the type "inverted mesh elements, linear discretisation used ..." you get, a few in non critical regions is mostly OK many or in rcitical regions (hig gradients/fluxes are severe warnings, indications for mesh improvements. Now I do not like mesh quality below 1e-3, so if you have much smaller you should take a second look on these critical regions (you can plot them with the mesh quality factor, check the doc)
Often structured mesh can have a low quality, as these miht have 2 "large" directions and a very short one.
A last comment is to use auto refinement, here COMSOL analysis the regions where the mesh quality and the solver errors are theworse and it triesto improve the mesh locally. In v3 I did not find the algorithm very efficient, compared to other FEM tools I had used (the meshing imprvement ws to general and not concentrating on local regions) but this might have been improved snce, I have just not tried it out, as mostly the automatic mesh gives an excellent starting point.
A relative resolution for the solver, means you cannot really trust many digits of your results, at least not in critical regions, the question is how to best identify where the solver is more or less precise, since the convergence criteria is a global identifier. That one I would also appreciate to learn more about ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Posted:
1 decade ago
12 nov 2012, 12:45 GMT-5
Hi Ivar,
thank you for your answer.
Sorry, I don't understand what do you mean with' auto refinement'. Do you mean to use adaptive mesh?
I have another quaestion: I build my model and also if mesh quality is bad I think that it could work well, considering that I have very thin layer. I check for gradient and skin depth and i think it is nearly ok.
I have constructed the mesh with free quadrangular and swept distribution in the thin layers, and free teatraheddral in the large regions.
If I build mesh with COMSOlL no error message are displayed and solution run and converge.
But if I save as .m file for matlab and run with Livelink for MATLAB, an error occur when mesh is building. The error message is:
'Failed to create swept mesh for domain
- Domain: 6
Failed to generate mesh for face
- Face: 23
Internal error free quad mesher
- Detail: The final mesh contains inverted quad elements.'
But if I build mesh with comsol it is ok and no error or warning message occur.
Can I ask matlab livelink for comsol to ignore this message and continues running? How can I?
thank you very much,
Patrizia
Hi Ivar,
thank you for your answer.
Sorry, I don't understand what do you mean with' auto refinement'. Do you mean to use adaptive mesh?
I have another quaestion: I build my model and also if mesh quality is bad I think that it could work well, considering that I have very thin layer. I check for gradient and skin depth and i think it is nearly ok.
I have constructed the mesh with free quadrangular and swept distribution in the thin layers, and free teatraheddral in the large regions.
If I build mesh with COMSOlL no error message are displayed and solution run and converge.
But if I save as .m file for matlab and run with Livelink for MATLAB, an error occur when mesh is building. The error message is:
'Failed to create swept mesh for domain
- Domain: 6
Failed to generate mesh for face
- Face: 23
Internal error free quad mesher
- Detail: The final mesh contains inverted quad elements.'
But if I build mesh with comsol it is ok and no error or warning message occur.
Can I ask matlab livelink for comsol to ignore this message and continues running? How can I?
thank you very much,
Patrizia
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:
1 decade ago
12 nov 2012, 14:35 GMT-5
Hi
indeed I was thinking of adaptative meshing.
If you have a mesh error of that type you cannot solve your model, as part of it is NOT meshed. So you need to find a way to get it fully meshed.
I hardly use matlab anymore (since v4) so I have never observe any problem of that kind, and have no true idea what it could be. It looks like the order of meshing the entities are different and something fails. A sweep mesh has some limitations.
What is wrong with the default thet mesh then ?
--
Good luck
Ivar
Hi
indeed I was thinking of adaptative meshing.
If you have a mesh error of that type you cannot solve your model, as part of it is NOT meshed. So you need to find a way to get it fully meshed.
I hardly use matlab anymore (since v4) so I have never observe any problem of that kind, and have no true idea what it could be. It looks like the order of meshing the entities are different and something fails. A sweep mesh has some limitations.
What is wrong with the default thet mesh then ?
--
Good luck
Ivar