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.

How to access the number of elements in each oscillation

Please login with a confirmed email address before reporting spam

Hi,

I'm modelling an active nematic in a 2D geometry. In my simulation, I observed oscillations. Please, how can I access the number of elements mesh in each of the oscillation? And how can I increase the mesh in each of the oscillation without increasing the mesh for the entire domain?

I have attached the figure that has the oscillations.



8 Replies Last Post 19 août 2023, 14:40 UTC−4
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 year ago 13 août 2023, 18:50 UTC−4
Updated: 1 year ago 13 août 2023, 18:50 UTC−4

This area of physics is not my specialty, but: (1) that 2D problem doesn't look especially computationally large, and (2) it seems you have plenty of oscillations, so it doesn't look to me like you would save much in terms of complexity by trying to limit regions of high mesh density. Why not just increase the number of elements overall, if you want more detail? And if you are running into memory issues, consider using an iterative solver (if you aren't already) or a different discretization. If that advice doesn't help, then I suggest you post your .mph file to the forum to allow for more detailed study by others.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
This area of physics is not my specialty, but: (1) that 2D problem doesn't look especially computationally large, and (2) it seems you have plenty of oscillations, so it doesn't look to me like you would save much in terms of complexity by trying to limit regions of high mesh density. Why not just increase the number of elements overall, if you want more detail? And if you are running into memory issues, consider using an iterative solver (if you aren't already) or a different discretization. If that advice doesn't help, then I suggest you post your .mph file to the forum to allow for more detailed study by others.

Please login with a confirmed email address before reporting spam

Posted: 1 year ago 14 août 2023, 05:16 UTC−4
Updated: 1 year ago 14 août 2023, 05:17 UTC−4

Thank you for your reply. (1) The problem is not computationally large at the moment. (2) I just want to find out the number of elements in each of the oscillation. The idea is that, if the mesh in each of the oscillation is small, what if I increase the number of elements, would the oscillations disappear or still remain? Although, I have tried to double the number of mesh but I still obtained the same result.

Thank you for your reply. (1) The problem is not computationally large at the moment. (2) I just want to find out the number of elements in each of the oscillation. The idea is that, if the mesh in each of the oscillation is small, what if I increase the number of elements, would the oscillations disappear or still remain? Although, I have tried to double the number of mesh but I still obtained the same result.

Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 year ago 14 août 2023, 11:24 UTC−4

Obtaining the same physics results, but with numerical models that employ different mesh densities, is usually desirable.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
Obtaining the same physics results, but with numerical models that employ different mesh densities, is usually desirable.

Please login with a confirmed email address before reporting spam

Posted: 1 year ago 14 août 2023, 14:10 UTC−4
Updated: 1 year ago 14 août 2023, 14:12 UTC−4

how can I access the number of elements mesh in each of the oscillation?

I don't see why it makes sense to do this.

The sensible thing to do is to choose a mesh size substantially smaller than the wavelength of the oscillations. Do this, look at the wavelength of the oscillations, and compare. If there is a large number of mesh elements per oscillation the solution is probably good. If you want to be sure, double the mesh density and check to see if the solution remains almost unchanged.

In many wave-type problems the number of mesh elements needed per wavelength is often not very large. (Often) 10 is generous and 6 may be adequate.

The other thing OP can do is to plot the mesh, or even superimpose the mesh plot on the solution.

As Robert noted, in 2D this is a very small problem. Mesh overkill is easy to obtain here. It's advisable for OP to become familar enough with advanced meshing options to customize the mesh if needed.

And as always, posting an mph file might help get better advice.

> how can I access the number of elements mesh in each of the oscillation? I don't see why it makes sense to do this. The sensible thing to do is to choose a mesh size substantially smaller than the wavelength of the oscillations. Do this, look at the wavelength of the oscillations, and compare. If there is a large number of mesh elements per oscillation the solution is probably good. If you want to be sure, double the mesh density and check to see if the solution remains almost unchanged. In many wave-type problems the number of mesh elements needed per wavelength is often not very large. (Often) 10 is generous and 6 may be adequate. The other thing OP can do is to plot the mesh, or even superimpose the mesh plot on the solution. As Robert noted, in 2D this is a very small problem. Mesh overkill is easy to obtain here. It's advisable for OP to become familar enough with advanced meshing options to customize the mesh if needed. And as always, posting an mph file might help get better advice.

Please login with a confirmed email address before reporting spam

Posted: 1 year ago 16 août 2023, 04:50 UTC−4
Updated: 1 year ago 16 août 2023, 04:50 UTC−4

Obtaining the same physics results, but with numerical models that employ different mesh densities, is usually desirable.

Thank you Robert

>Obtaining the same physics results, but with numerical models that employ different mesh densities, is usually desirable. Thank you Robert

Please login with a confirmed email address before reporting spam

Posted: 1 year ago 16 août 2023, 05:01 UTC−4

how can I access the number of elements mesh in each of the oscillation?

I don't see why it makes sense to do this.

The sensible thing to do is to choose a mesh size substantially smaller than the wavelength of the oscillations. Do this, look at the wavelength of the oscillations, and compare. If there is a large number of mesh elements per oscillation the solution is probably good. If you want to be sure, double the mesh density and check to see if the solution remains almost unchanged.

In many wave-type problems the number of mesh elements needed per wavelength is often not very large. (Often) 10 is generous and 6 may be adequate.

The other thing OP can do is to plot the mesh, or even superimpose the mesh plot on the solution.

As Robert noted, in 2D this is a very small problem. Mesh overkill is easy to obtain here. It's advisable for OP to become familar enough with advanced meshing options to customize the mesh if needed.

And as always, posting an mph file might help get better advice.

Hi Davi,

I started using COMSOL. I have attached my mph file. What I did was to double the mesh and the oscillations are still observed.

>> how can I access the number of elements mesh in each of the oscillation? > >I don't see why it makes sense to do this. > >The sensible thing to do is to choose a mesh size substantially smaller than the wavelength of the oscillations. Do this, look at the wavelength of the oscillations, and compare. If there is a large number of mesh elements per oscillation the solution is probably good. If you want to be sure, double the mesh density and check to see if the solution remains almost unchanged. > >In many wave-type problems the number of mesh elements needed per wavelength is often not very large. (Often) 10 is generous and 6 may be adequate. > >The other thing OP can do is to plot the mesh, or even superimpose the mesh plot on the solution. > >As Robert noted, in 2D this is a very small problem. Mesh overkill is easy to obtain here. It's advisable for OP to become familar enough with advanced meshing options to customize the mesh if needed. > >And as always, posting an mph file might help get better advice. Hi Davi, I started using COMSOL. I have attached my mph file. What I did was to double the mesh and the oscillations are still observed.


Please login with a confirmed email address before reporting spam

Posted: 1 year ago 16 août 2023, 13:29 UTC−4

Apparently the question you asked is not the question you had.

The question you really have is "why is the result of the simulation different from what I expect?"

I can't help with that because I don't know anything about the physics of liquid crystals. I can say that the number of mesh elements is plenty large.

In general when the result of a simulation does not agree with expectations then either the simulation is wrong, the expectation is wrong, or both.

Apparently the question you asked is not the question you had. The question you really have is "why is the result of the simulation different from what I expect?" I can't help with that because I don't know anything about the physics of liquid crystals. I can say that the number of mesh elements is plenty large. In general when the result of a simulation does not agree with expectations then either the simulation is wrong, the expectation is wrong, or both.

Please login with a confirmed email address before reporting spam

Posted: 1 year ago 19 août 2023, 14:40 UTC−4

Thank you Dave. I have been able to resolve this. Please, how can I make the attached figure bigger than this. I used 4096 by 450 pixels

Thank you Dave. I have been able to resolve this. Please, how can I make the attached figure bigger than this. I used 4096 by 450 pixels

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.