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

Coupled PDE

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2016, 21:04
Default Coupled PDE
  #1
Member
 
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10
cute is on a distinguished road
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.
cute is offline   Reply With Quote

Old   July 8, 2016, 14:52
Default
  #2
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
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.
rapierrz is offline   Reply With Quote

Old   July 8, 2016, 15:52
Default
  #3
Member
 
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10
cute is on a distinguished road
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.
cute is offline   Reply With Quote

Old   July 11, 2016, 08:52
Default
  #4
Member
 
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10
cute is on a distinguished road
Anyone has any suggestion?
cute is offline   Reply With Quote

Old   July 11, 2016, 10:12
Default
  #5
Senior Member
 
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 17
hk318i is on a distinguished road
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
__________________
@HIKassem | HassanKassem.me
hk318i is offline   Reply With Quote

Old   July 11, 2016, 16:09
Default
  #6
Member
 
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10
cute is on a distinguished road
Thanks for pointing these two links, I will definitely try these two links and will update you.
cute is offline   Reply With Quote

Old   July 11, 2016, 17:35
Default
  #7
Member
 
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10
cute is on a distinguished road
what is foam-ext? Where can I find this?
cute is offline   Reply With Quote

Old   July 12, 2016, 06:07
Default
  #8
Senior Member
 
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 17
hk318i is on a distinguished road
Quote:
Originally Posted by cute View Post
what is foam-ext? Where can I find this?
foam-extend
__________________
@HIKassem | HassanKassem.me
hk318i is offline   Reply With Quote

Old   July 12, 2016, 20:42
Default
  #9
Member
 
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10
cute is on a distinguished road
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
cute is offline   Reply With Quote

Old   July 13, 2016, 07:39
Default
  #10
Senior Member
 
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 17
hk318i is on a distinguished road
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.
__________________
@HIKassem | HassanKassem.me
hk318i is offline   Reply With Quote

Old   July 13, 2016, 07:57
Default
  #11
Member
 
anonymous
Join Date: Mar 2016
Location: Canada
Posts: 93
Rep Power: 10
cute is on a distinguished road
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?
cute is offline   Reply With Quote

Old   July 13, 2016, 08:25
Default
  #12
Senior Member
 
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 17
hk318i is on a distinguished road
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.
__________________
@HIKassem | HassanKassem.me
hk318i is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[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


All times are GMT -4. The time now is 07:36.