1
$\begingroup$

I have a differential system like this, where $\Phi$ is a scalar valued unknown function: $$\nabla\Phi = \left(f_1(x, y), f_2(x,y)\right)^T$$ I'm trying to solve it in a FEM solver (COMSOL Multiphysics), where $\Phi$ would be my dependent variable and $f_1, f_2$ are known functions.

Normally, the DE describing a dependent variable $u$ would have the form: $$f_1\frac{\partial u}{\partial x}+f_2\frac{\partial u}{\partial y} = f_3$$ where $f_1, f_2, f_3$ are functions of $x, y$ and also possibly $u$. Above, we have a single differential equation, for a single scalar valued unknown $u$.

But in the problem I described (the very first equation), I have a single scalar unknown $\Phi$, but two separate differential equations. How do I cast it into a single differential equation to solve it in COMSOL? Because COMSOL accepts one differential equation per dependent variable.

$\endgroup$
1
  • 1
    $\begingroup$ Do you know any boundary conditions for $\Phi$ ? $\endgroup$
    – cfdlab
    Jun 10, 2020 at 6:05

2 Answers 2

9
$\begingroup$

Your equation is not well posed: For general functions $f_1,f_2$, there is no function $\Phi$ so that the equation can be satisfied. For example, if you had $f_1=f_2=x$, then you are looking for a $\Phi(x,y)$ so that $$ \Phi_x = x $$ and $$ \Phi_y = x. $$ But the first of these equations imply that $$ \Phi = \frac 12 x^2+h(y) $$ whereas the second implies that $$ \Phi = xy+j(x). $$ Here, $h(y)$ is a function that only depends on $y$, and $j(x)$ a function that only depends on $x$. But this is a contradiction: $\Phi$ cannot have both of these forms at the same time.

In other words, you have to go back to the drawing board and think about where the equation you have comes from, and where the mistake in its derivation lies.

(Alternatively, of course, it is possible that the functions $f_1,f_2$ satisfy very specific conditions that guarantee existence of a solution. But then you will want to exploit these conditions in your solution approach.)

$\endgroup$
3
  • $\begingroup$ Conclusion is correct but at the moment the integrations of $\Phi_x$ and $\Phi_y$ are not. $\endgroup$ Dec 31, 2022 at 17:03
  • 1
    $\begingroup$ @Aruralreader Better now? $\endgroup$ Jan 1, 2023 at 19:08
  • $\begingroup$ Yes sir, perfect! 🙂 $\endgroup$ Jan 1, 2023 at 19:49
2
$\begingroup$

For this problem to be well-posed the necessary and sufficient condition is $\partial_y f_1 = \partial_x f_2$. If that is satisfied then $\Phi$ is a potential field and it is given by

$$ \Phi(\vec{r}) = \Phi(\vec{r}_0) + {\large\int}_{\vec{r}_0}^{\vec{r}} (f_1,f_2)^T \cdot d\vec{r} $$

where $\vec{r}=(x,y)$ and $\vec{r}_0=(x_0,y_0)$ is a reference location.

Alternatively, it can be cast in the form of the Poisson equation which can be solved by standard numerical techniques (provided the appropriate boundary conditions)

$$ \nabla^2 \Phi = \rho, $$

where $\rho = \partial_x f_1 + \partial_y f_2$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.