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/)
-   -   Solve Ax=b (https://www.cfd-online.com/Forums/openfoam-programming-development/157787-solve-ax-b.html)

Rutger August 8, 2015 05:19

Solve Ax=b
 
Hi,

I searched the forum but couldn't find a similar problem respectively an answer.
I'm running a simulation that stores its results in a volScalarField b ∈ R^n and a volVectorField A ∈ R^{nxn}.
The mathematically relation between them is A*x = b, which I want to solve for x. In another project I used a solver from the Eigen libary but now I want to calculate it in OpenFOAM.

It is possible to solve this linear equation or do I need to use a fvMatrix type for A ?

Rutger August 10, 2015 04:44

For everyone with the same problem:

The example in application/test/Matrix/Test-Matrix.C helped a lot. Now I'm copying the values from the vol*Field to the corresponding datatypes and solve the system.

Tushar@cfd August 10, 2015 09:13

Dear Rutger,

Have a look to the eigen value solver given in Tensor.C file. I think this will help you.

-
Best Luck!

Rutger August 13, 2015 07:26

Thanks, I will have a look at it.


All times are GMT -4. The time now is 08:40.