Please login with a confirmed email address before reporting spam
Posted:
4 years ago
Jul 9, 2020, 8:38 a.m. EDT
Updated:
4 years ago
Jul 9, 2020, 9:19 a.m. EDT
Hello Harsha,
This is an interesting question.
I do not have a full answer that would work out of the box in COMSOL, but I see two work-arounds. Hopefully someone with more experience can provide a better solution
- Export the volume fraction and pressure fields, then work out the problem in python
- Compute an approximated average using a Gaussian as a substitute for the Dirac distribution
I will focus on solution n°2:
The point is that you are interested in the quantity
where is the volume fraction field, is the pressure field and is the meniscus area
The idea is to approximate with a narrow normal distribution
So for small enough, you can take
. Where has the dimension of u and is to be interpreted as the width of a small averaging window around the meniscus value .
So, I would define this expression in COMSOL using the usual integration operators, then trace this quantity has a function of . As it get smaller, should converge, until becomes too small compared to the mesh spacing I presume.
I wish I knew a more efficient answer to your question.
Hello Harsha,
This is an interesting question.
I do not have a full answer that would work out of the box in COMSOL, but I see two work-arounds. Hopefully someone with more experience can provide a better solution
1. Export the volume fraction and pressure fields, then work out the problem in python
2. Compute an approximated average using a Gaussian as a substitute for the Dirac distribution
I will focus on solution n°2:
The point is that you are interested in the quantity
P_{avg} = (1/S) \times \iiint \delta\left(\phi(\vec{x} - \frac{1}{2}\right) \times P(\vec{x}) d^3\vec{x}
where \phi(\vec x) is the volume fraction field, P(\vec x) is the pressure field and S is the meniscus area
S = \iiint \delta\left(\phi(\vec{x}) - \frac{1}{2}\right) d^3\vec{x}
The idea is to approximate \delta with a narrow normal distribution
\delta(u) = \lim_{\sigma \to 0} \frac{1}{\sigma \sqrt{2\pi}} e^{-\frac{1}{2}\left(\frac{u}{\sigma}\right)^2}
So for \sigma small enough, you can take
\delta(u) \simeq \frac{1}{\sigma \sqrt{2\pi}} e^{-\frac{1}{2}\left(\frac{u}{\sigma}\right)^2}. Where \sigma has the dimension of u and is to be interpreted as the width of a small averaging window around the meniscus value \phi_m = 1/2.
So, I would define this expression in COMSOL using the usual integration operators, then trace this quantity has a function of \sigma. As it get smaller, P_{avg} should converge, until \sigma becomes too small compared to the mesh spacing I presume.
I wish I knew a more efficient answer to your question.