implicit div(k*grad(a*u))
Hello,
I have asked in "Running / Solving / CFD (http://www.cfdonline.com/Forums/ope...kgradu.html)" before, but now this seems to be a programming question. How can I treat implicitly?  scalar field (known diffusivity)  scalar field (known mass fraction)  scalar field (unknown) fvm::laplacian(k,alpha*u) generates a compiler error. I think a possible solution is to rightmultiply the fvMatrix fvm::laplacian(k,u) with a diagonal matrix made up of the values of on it's diagonal. But how do I write this in C++? Thank you Gunnar 
Is it really not possible to build a diagonal matrix?
Another possibility can be first to construct fvMatrix M=fvm::laplacian(k,u) In the next step I would have to multiply each row i of the matrix M with alpha[i]. However I don't understand the storage format of fvMatrix. May I ask if somebody would share a few lines of code, how to multiply one row of a fvMatrix with a scalar value? Thank you Gunnar 

Can you use the chain rule to seperate alpha and u?

Hi Gunnar!
You can use this function: Code:
namespace Foam{ namespace fvm{ Jakob 
Hi Jakob,
I read your post and it seems that you can know the answer for my question with laplacian operator. If you dont mind please read my post at: http://www.cfdonline.com/Forums/ope...nproblem.html 
All times are GMT 4. The time now is 14:16. 