OpenFOAM のベクトル演算

OpenFOAM には,ベクトルに対する様々な演算子が用意されています.次のプログラムを実行して,それぞれの演算子の意味を確認しましょう.

Test Program


Meaning of the Operations
    • cmptMax

$$cmptMax({\bf a}) = max (a_{1},\;a_{2},\;a_{3})$$

    • cmptMin

$$cmptMin({\bf a}) = min (a_{1},\;a_{2},\;a_{3})$$

    • cmptSum

$$cmptSum({\bf a}) = a_{1} + a_{2} + a_{3}$$

    • cmptAv

$$cmptAv({\bf a}) = \frac{a_{1} + a_{2} + a_{3}}{3}$$

    • cmptProduct

$$cmptProduct({\bf a}) = a_{1} \times a_{2} \times a_{3}$$

    • cmptMag

$$cmptMag({\bf a}) = (|a_{1}|\;\;|a_{2}|\;\;|a_{3}|)$$

    • cmptMultiply

$$cmptMultiply({\bf b},\;{\bf c}) = (b_{1}\times c_{1}\;\;b_{2}\times c_{2}\;\;b_{3}\times c_{3})$$

    • max

$$max({\bf b},\;{\bf c}) = (max(b_{1},\;c_{1})\;\;max(b_{2},\;c_{2})\;\;max(b_{3},\;c_{3}))$$

    • min

$$min({\bf b},\;{\bf c}) = (min(b_{1},\;c_{1})\;\;min(b_{2},\;c_{2})\;\;min(b_{3},\;c_{3}))$$

これらのベクトル演算子は,VectorSpaceI.H ファイルで実装されています.

Author: fumiya

CFD engineer in Japan

2 thoughts on “OpenFOAM のベクトル演算”

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.