Register Blogs Members List Search Today's Posts Mark Forums Read

August 17, 2022, 06:49
#1
New Member

mo
Join Date: May 2022
Posts: 15
Rep Power: 2
Hi,everyone.

I would like to use the OpenFOAM function LUsolve, but I don't know how to use it.

After studying the code in which LUsolve is used, it seems that, for example, if one wants to solve the simultaneous linear equation Ax=b, one can use the statement LUsolve(A,x), where b is added to x in such a way that it is transferred to the left side. I do not understand why b is added to x. The code for the viewfactor method I referred to is as follows

Quote:
 if (Pstream::master()) { // Variable emissivity if (!constEmissivity_) { scalarSquareMatrix C(totalNCoarseFaces_, 0.0); for (label i=0; i
Here it is trying to solve the equation Cq=b,
where:
Cij = deltaij/Ej - (1/Ej - 1)Fij
q = heat flux
b = A eb - Ho
and:
eb = sigma*T^4
Ej = emissivity
Aij = deltaij - Fij
Fij = view factor matrix

Can someone please tell me how to use LUsolve in detail?

 August 28, 2022, 13:14 #2 Senior Member   Joachim Herb Join Date: Sep 2010 Posts: 649 Rep Power: 20 Have a look at this thread: How to solve linear equations in codedFixedValue boundary? It shows two different ways for solving linear equations in OpenFOAM. One if you want to solve for a vector in each cell of your mesh based on a 3x3 matrix and a vector and another for a generic square matrix.

 August 29, 2022, 12:13 #3 New Member   mo Join Date: May 2022 Posts: 15 Rep Power: 2 Hi,jherb. Thank you for your reply. I will refer to the thread you indicated.

 Tags lusolve, openfoam