|
[Sponsors] |
Solving laplace's equation with Neumann conditions |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 29, 2017, 06:57 |
Solving laplace's equation with Neumann conditions
|
#1 |
New Member
Join Date: Oct 2014
Posts: 13
Rep Power: 12 |
Hello,
I've got a simple question about the laplace equation combined with Neumann conditions. My case is a simple 3D box where Neumann conditions (zeroGradient) are applied to every face. The initial value for my variable T is set to 300. Now I'm trying to solve the equation Code:
solve ( fvm::laplacian(k, T, "laplacian(k,T)") ); Code:
DICPCG: Solving for pot, Initial residual = 0.6179873, Final residual = 8.546418e+08, No Iterations 20001 Is there a reason for this behavior? Is this problem maybe not well defined with the given BC? Thanks for your help! |
|
June 29, 2017, 07:45 |
|
#2 |
Senior Member
|
I think it's correct to say that you're violating Cauchy's theorem. You can't define bc for first derivatives only.
Your calculation diverges because has infinite solutions. Regards. Sent from my ASUS_X008D using CFD Online Forum mobile app |
|
June 29, 2017, 08:03 |
|
#3 |
New Member
Join Date: Oct 2014
Posts: 13
Rep Power: 12 |
By Cauchy's theorem you mean the Cauchy–Kowalevski theorem?
Edit: If we assume the equation changes to Code:
solve ( fvm::laplacian(k, T, "laplacian(k,T)") + S == 0 ); |
|
June 29, 2017, 08:42 |
|
#4 |
Senior Member
|
1. Use Dirichlet BC on a single face. Similar to solution of Poisson equation for pressure in SIMPLE/PISO. I.e. in terms of OpenFOAM this is called setting reference cell.
2. Or you can go with this solution: https://math.stackexchange.com/quest...ary-conditions There was another post on stackexchange concerning the problem, unfortunately I can not find it now, maybe you will be luckier. |
|
June 29, 2017, 09:43 |
|
#5 |
Senior Member
|
Solution exist if you set two gradients like this case.
https://www.dropbox.com/s/8gwaq3kgqa...umann.zip?dl=0 run Code:
ideasUnvToFoam cad/Mesh_1.unv laplacianFoam |
|
June 29, 2017, 11:00 |
|
#6 |
New Member
Join Date: Oct 2014
Posts: 13
Rep Power: 12 |
Thanks @alexeym now I understand the problem a bit more.
Thanks @student666 it converges indeed with the given Neumann conditions. So if we assume a box with a source and a sink (e.g. the source is bigger than the sink) and Neumann conditions on all walls then my solution will always explode towards +infinity since there is no flux through the walls right? In case of student666's proposed solution the solution converges since everything which is added due to the positive gradient is substracted due to the negative gradient? |
|
June 29, 2017, 11:58 |
|
#7 |
Senior Member
|
What kind of analysis you want to perform?
Sent from my ASUS_X008D using CFD Online Forum mobile app |
|
June 29, 2017, 13:29 |
|
#8 |
New Member
Join Date: Oct 2014
Posts: 13
Rep Power: 12 |
I'm trying to implement a potential equation for an electric potential which is basically the equation I provided above. A lot of papers I read about these potential equations (for my case) are saying that the boundary conditions are given by Neumann conditions (zeroGradient) since there's no potential flux across these borders. Further there is also a source and a sink given which are not of the same order.
So it seems like I'm misunderstanding something because under given equation (+ source/sink) and boundary conditions there's no stable simulation possible. |
|
June 29, 2017, 14:28 |
|
#9 |
Senior Member
|
I think you can use a very big domain with dirichlet bc in order that boundary are far away from your source and sink and the solution is not directly influenced by the bc. In this way your math formulation is correct
Sent from my ASUS_X008D using CFD Online Forum mobile app |
|
June 29, 2017, 14:43 |
|
#10 |
New Member
Join Date: Oct 2014
Posts: 13
Rep Power: 12 |
This approach is unfortunately not possible since the domain is limited in its size because it's included in some other domains. The source/sink is also close to the boundaries.
|
|
June 29, 2017, 14:56 |
|
#11 |
Senior Member
|
Well, one last suggestion is that you define a very small patch, just a small face with a fixed value; sorry but more than this I can't be of help.
Good luck Sent from my ASUS_X008D using CFD Online Forum mobile app |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
pimpleDyMFoam computation randomly stops | babapeti | OpenFOAM Running, Solving & CFD | 5 | January 24, 2018 06:28 |
calculation stops after few time steps | sivakumar | OpenFOAM Running, Solving & CFD | 7 | March 17, 2013 07:37 |
Orifice Plate with a fully developed flow - Problems with convergence | jonmec | OpenFOAM Running, Solving & CFD | 3 | July 28, 2011 06:24 |
Error while running rhoPisoFoam.. | nileshjrane | OpenFOAM Running, Solving & CFD | 8 | August 26, 2010 13:50 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 19:07 |