Coupled PDE
Dear Foamer,
I am new in OpenFoam and would like to learn. I need your help. Consider the following two PDEs that I would like to solve in a coupled manner. ddt(C) = laplacian(d, C) - alpha*F(C)*X ddt(X) = laplacian(DX, X) + F(C)*X - beta*X where F(C) = C/(0.5+C), DX = gamma*sqr(X) and d, alpha and beta are some real numbers. Could you please help me writing code for above system or provide some code snippet? Thanks. |
Hi cute,
For adding this equation in openfoam you can see other solvers, For example you can see this tutorial: https://openfoamwiki.net/index.php/H...ure_to_icoFoam for coupling of two equation you can use of a corrector loop and solve two equation and correct them with some iteration. |
Thanks rapierrz. Yes, I have seen this tutorial and used it to solve the PDEs using segregated method. But now, I want to store these equations into one matrix and then solve, i.e. coupling method. In my another post, alexeym suggested that "write them in coupled manner, i.e. q = ||C, X||, and then write your equations in terms of q. Then you introduce volVector2DField and solve equation as usual, or just use volVectorField assuming third component as 0."
http://www.cfd-online.com/Forums/ope...tml#post608481 (post#15) I have a difficulty of implementing in a coupled manner as suggest by alexeym. If someone can provide the starter code that would be helpful. Thanks. |
Anyone has any suggestion?
|
Hello,
I cannot give you a complete answer but you may need to check foam-ext. It has a coupled solver. Also, you may try something like Vector-Coupled solver [LINK] in OpenFOAM |
Thanks for pointing these two links, I will definitely try these two links and will update you.
|
what is foam-ext? Where can I find this?
|
Quote:
|
Thanks Hassan Kaseem.
I found blockMatrix package that I am trying to install on my machine under openfoam-3.0.1. When I execute wmake command, I get following errors. How can I fix these errors? Code:
In file included from BlockLduMatrix/BlockLduMatrix.H:471:0, |
Unfortunately, there is no direct way to compile foam-extend code in OpenFOAM. There are major differences between the two forks. You can use foam-extend as it is or you can try to port the code which could mean reimplementing the complete library and solver in OpenFOAM.
|
hmmm... so it is not that easy to use coupled solver.
As a beginner, it would be difficult to reimplement the library and solver. :confused: I am curious to know: (1) why it is still not included in the current version of openfoam? is it difficult? (2) what others are doing, if they need coupled solver? |
This topic is discussed here few times and I know it is not easy to port the code even for experienced user. Here are two links to gives you some background. olaFoam & this thread
Regarding the second question, some users just using the version which satisfy their needs. Some of them have the manpower and time to implement their needs then they may or may not share their code. As I understand from OpenCFD website, coupled solver is underdevelopment. |
All times are GMT -4. The time now is 10:17. |