CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Add a constraint equation (https://www.cfd-online.com/Forums/openfoam-solving/120593-add-constraint-equation.html)

sebastien.cadalen July 10, 2013 09:28

Add a constraint equation
 
Dear all,

This post is about the way to impose an integral relation on the problem variables. As an example, let us consider a steady-state thermal transport problem with the following constraint:
\frac{1}{V} \int_{\mathcal{V}} T \, d\mathcal{V} = T_0
where \mathcal{V} is the fluid domain, V is the volume of the fluid domain, and T_0 a given temperature.

From a mathematical point of view this is equivalent to introduce a constant source term in the domain to satisfy the constraint. If the unconstrain problem is writen in the discrete space A \cdot X = B hence the constrained problem is:
\left(
\begin{array}{cc}
A & C^t \\ C & 0
\end{array}
\right)
\cdot
\left(
\begin{array}{c}
X \\ \lambda
\end{array}
\right)
=
\left(
\begin{array}{c}
B \\ T_0
\end{array}
\right)
where C is a row vector composed of V_i/V (the cell volume divided by the total volume) and \lambda is the Lagrange multiplier associated to the constraint.

This way the constraint is implicitly solved. We can also imagine the same kind of contraint on a part of the domain, on a surface of the domain, or involving more than one unknown, etc.

Is there any way to solve such a problem with implicit or explicit method?

If yes, how behaves the linear solvers with such a matrix to invert?

Best regards,

Sébastien

charles4allme April 2, 2019 15:23

Hello,

Were you able to figure out the solution to a problem. I am trying to add a constraint equation in OpenFOAM

fanny September 21, 2021 07:26

Hi all,

I would also want to impose a constraint as an integral relation over the whole fluid domain, but I do not know how to to do it..

Do you have some ideas ?
May I use " fvOptions type vectorDomainIntegral; " ? How it works ? Is there somewhere any tutorial ?



Thank you
Fanny



PS: I am using OpenFOAM v7.


All times are GMT -4. The time now is 03:38.