CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

About LUsolve

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   August 17, 2022, 05:49
Default About LUsolve
  #1
New Member
 
mo
Join Date: May 2022
Posts: 24
Rep Power: 3
gmori is on a distinguished road
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<totalNCoarseFaces_; i++)
{
for (label j=0; j<totalNCoarseFaces_; j++)
{
const scalar invEj = 1.0/E[j];
const scalar sigmaT4 =
physicoChemical::sigma.value()*T4[j];

if (i==j)
{
C(i, j) = invEj - (invEj - 1.0)*Fmatrix_()(i, j);
q[i] +=
(Fmatrix_()(i, j) - 1.0)*sigmaT4 + qrExt[j];
}
else
{
C(i, j) = (1.0 - invEj)*Fmatrix_()(i, j);
q[i] += Fmatrix_()(i, j)*sigmaT4;
}

}
}

Info<< "Solving view factor equations for band :"
<< bandI << endl;

// Negative coming into the fluid
LUsolve(C, q);
}
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?
Thank you in advance.
gmori is offline   Reply With Quote

 

Tags
lusolve, openfoam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntaxproblem LU decomposition of a matrix kathrin_kissling OpenFOAM Running, Solving & CFD 2 January 20, 2009 12:46


All times are GMT -4. The time now is 16:45.