# Discussion Forum

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

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 2023年8月19日 GMT-4 14:40

Posted: 1 year ago
Updated: 1 year ago

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

Posted: 1 year ago
Updated: 1 year ago

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.

Posted: 1 year ago

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

Posted: 1 year ago
Updated: 1 year ago

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.

Posted: 12 months ago
Updated: 12 months ago

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

Thank you Robert

Posted: 12 months ago

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.

Posted: 12 months ago

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.