CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Help solving "c dot inv(A)" after solving the field variable (Ax=b) (https://www.cfd-online.com/Forums/openfoam-programming-development/141591-help-solving-c-dot-inv-after-solving-field-variable-ax-b.html)

Logan Page September 11, 2014 07:57

Help solving "c dot inv(A)" after solving the field variable (Ax=b)
 
I need help trying to solve "c dot inv(A)" after having solved for the field variable (Ax=b)

The simplyfied OpenFoam pseudo-code is:
Code:

    // create volScalarField's for governing equations
    // create volScalarField c

    fvMatrix Eqn
    (
        // governing equations - discretize
    );
    Eqn.relax();
    Eqn.solve();  // Ax=b
   
    // volScalarField phi = c & inv(A);
    // I'm at a loss on how to compute this.

x --> [1 x m] volScalarField
A --> [m x m] lduMatrix
b --> [1 x m] volScalarField --> I assume accessed with "Eqn.source();"

inv(A) = inv(L) & inv(D) & inv(U)
phi = c & ( inv(L) & inv(D) & inv(U) )

Any help on how to implement this in OpenFoam would be appreciated :)


All times are GMT -4. The time now is 15:27.