|
[Sponsors] |
July 7, 2016, 21:04 |
Coupled PDE
|
#1 |
Member
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10 |
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. |
|
July 8, 2016, 14:52 |
|
#2 |
Senior Member
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11 |
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. |
|
July 8, 2016, 15:52 |
|
#3 |
Member
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10 |
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. |
|
July 11, 2016, 08:52 |
|
#4 |
Member
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10 |
Anyone has any suggestion?
|
|
July 11, 2016, 16:09 |
|
#6 |
Member
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10 |
Thanks for pointing these two links, I will definitely try these two links and will update you.
|
|
July 11, 2016, 17:35 |
|
#7 |
Member
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10 |
what is foam-ext? Where can I find this?
|
|
July 12, 2016, 06:07 |
|
#8 |
Senior Member
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 17 |
||
July 12, 2016, 20:42 |
|
#9 |
Member
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10 |
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, from BlockLduMatrix/scalarBlockLduMatrix.H:42, from BlockLduMatrix/blockLduMatrices.H:39, from BlockLduMatrix/blockLduMatrices.C:33: BlockLduMatrix/BlockLduMatrix.C: In constructor ‘Foam::BlockLduMatrix<Type>::BlockLduMatrix(const Foam::lduMesh&)’: BlockLduMatrix/BlockLduMatrix.C:58:32: error: ‘const class Foam::lduAddressing’ has no member named ‘nPatches’ coupleUpper_(ldu.lduAddr().nPatches()), ^ BlockLduMatrix/BlockLduMatrix.C:59:32: error: ‘const class Foam::lduAddressing’ has no member named ‘nPatches’ coupleLower_(ldu.lduAddr().nPatches()), ^ make: *** [Make/linux64Gcc49DPInt32Opt/BlockLduMatrix/blockLduMatrices.o] Error 1 |
|
July 13, 2016, 07:39 |
|
#10 |
Senior Member
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 17 |
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.
|
|
July 13, 2016, 07:57 |
|
#11 |
Member
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10 |
hmmm... so it is not that easy to use coupled solver.
As a beginner, it would be difficult to reimplement the library and solver. 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? |
|
July 13, 2016, 08:25 |
|
#12 |
Senior Member
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 17 |
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. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ANSYS Meshing] Help with element size | sandri_92 | ANSYS Meshing & Geometry | 14 | November 14, 2018 08:54 |
Algorithm for coupled pde with all flux boundary conditions | benk | Main CFD Forum | 3 | December 28, 2010 06:09 |
Some confusion about coupled solver for incompressible flow | bearcat | Main CFD Forum | 0 | February 14, 2010 21:40 |
PDE coupled !! | Doche | Main CFD Forum | 11 | December 4, 2004 04:43 |
Coupled 1D/3D STAR-CD Training | CD adapco Group Marketing | Siemens | 1 | November 13, 2002 16:48 |