by estragiotti
Last Updated October 09, 2019 14:20 PM

I have a rectangular mesh of dimension $n,m$ and a scalar field $\theta(x,y)$ defined over the different nodes of the mesh. I want to link $\theta(x,y)$ to an initial condition level-set function $ \phi $ using this relation:

$$ \theta(x,y) = \frac{\pi}{2} - \arctan \Bigg( \frac{\frac{\partial \phi}{\partial y}}{\frac{\partial \phi}{\partial x}} \Bigg) $$

Since there are infinite functions that verify the above relation I've added another dummy constraint:

$$ \| \nabla \phi \| = 1 \implies \sqrt{(\frac{\partial \phi}{\partial x})^2 + (\frac{\partial \phi}{\partial y})^2} = 1$$ $$ \frac{\partial \phi}{\partial x} = \pm \sqrt{1-(\frac{\partial \phi}{\partial y})^2}$$

I know the scalar field $\theta(x,y)$ everywhere, and with the two relation written above, I also know the numerical value of the gradient of the function.

So right now, I would integrate the first relation to find $\phi$, but I'm completely blocked. I don't know exactly how to deal with such a discrete problem. I need the value of the function $\phi$ over the nodes of the mesh. I was thinking to integrate

$$ \int d\phi = \int \sqrt{\frac{\tan^2(\frac{\pi}{2} - \theta(x,y))}{\tan^2(\frac{\pi}{2} - \theta(x,y))+1}} \:\:dy$$

and I've tried to implement it in MATLAB without results.

Have you any idea on how to deal with such a problem?

PS: I can if needed query my MATLAB script to get more points for $\theta(x,y)$.

Thanks in advance! Enrico

Updated November 26, 2017 04:20 AM

Updated December 11, 2017 00:20 AM

- Serverfault Query
- Superuser Query
- Ubuntu Query
- Webapps Query
- Webmasters Query
- Programmers Query
- Dba Query
- Drupal Query
- Wordpress Query
- Magento Query
- Joomla Query
- Android Query
- Apple Query
- Game Query
- Gaming Query
- Blender Query
- Ux Query
- Cooking Query
- Photo Query
- Stats Query
- Math Query
- Diy Query
- Gis Query
- Tex Query
- Meta Query
- Electronics Query
- Stackoverflow Query
- Bitcoin Query
- Ethereum Query