
[Sponsors] 
Solving a system of equations to calculate boundary conditions 

LinkBack  Thread Tools  Search this Thread  Display Modes 
December 13, 2013, 18:46 
Solving a system of equations to calculate boundary conditions

#1 
New Member
Eng. Emmanuel Luján
Join Date: Mar 2013
Posts: 5
Rep Power: 10 
Hi,
I have a simulation where the boundary conditions are calculated solving, each time step, a nonlinear, inhomogeneous, partial differential system of equations. Is there an easy way to do that? How do you solve this problem? Thanks! Emmanuel 

December 15, 2013, 05:24 

#2 
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 19 
Is it a differential equation that you can solve on a "per face" basis, or do you need to calculate it based on integrated quantities? You might want to check how it is implemented in the "advective" boundary condition.


December 16, 2013, 14:41 

#3 
New Member
Eng. Emmanuel Luján
Join Date: Mar 2013
Posts: 5
Rep Power: 10 
Dear Bernhard,
thanks for your time. Currently the domain of my problem is a box. One of the faces of this box represents an anode. I need to calculate some scalar fields (C_1, C_2, C_3, C_4 y V) on this face, solving this equation system:  D_1 * grad(C_1)  s_1 * u_1 * C_1 * grad(V) = I_1 / F  D_2 * grad(C_2)  s_2 * u_2 * C_2 * grad(V) = 0  D_3 * grad(C_3)  s_3 * u_3 * C_3 * grad(V) = I_2 / F  D_4 * grad(C_4)  s_4 * u_4 * C_4 * grad(V) = 0 C_4 = (s_1 * C_1 + s_2 * C_2 + s_3 * C_3)/s4 I_1_exp = (F/(2*R*T)) * (V + E0eq_I ); I_2_exp = (F/(2*R*T)) * (V + E0eq_II ); I_1 = I_0I * ( exp (I_1_exp)  (C_1 / C_1_0) * exp (I_1_exp)) ; I_2 = I_0II * ( (C_2 / C_2_0) * exp (I_2_exp)  exp (I_2_exp)) ; Where C_1, C_2, C_3, C_4 and V are the fields I want to calculate, and the others are known constants. Thanks again. Emmanuel Last edited by elujan; December 16, 2013 at 16:29. 

December 16, 2013, 15:39 

#4 
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,890
Rep Power: 34 
Hi Emmanuel,
As I see it, you can approach this in a couple of ways: 1. You can linearise the system and solve it on an faMesh (available in OF1.6ext), and then loop around the linearised, segregated system of equations until you have reach an given tolerance. 2. You can simply write your own nonsegregated approach for this. If the equation only come in this form, it should be relatively easy, however, you need to be very careful in terms of correct coupling across potential processor boundaries in the case of parallel computing. 3. More recent versions of OF from ESI also support the solution of equations on boundary patches. I do not know, how these works, but it could be an option, if you work in one of those releases. Again, this will most probably lead to a linearised, segregated system, which requires a number of outer loops for convergence. The outer loops obviously comes into play via the coupling between the C_i fields and V (their products) and also because V is inside the exponential. I am thinking whether a simple Taylor expansion with only 2 or 3 terms around the old value of V would be a good way of approaching this? It would mean that you could have part of the source term implicitly represented in your linear system of equations. Good luck, Niels
__________________
Please note that I do not use the Friendfeature, so do not be offended, if I do not accept a request. 

November 18, 2015, 12:01 

#5 
New Member
Join Date: Jul 2014
Posts: 26
Rep Power: 9 
Hello,
I know this is an old post, but I was wondering if you managed to solve the problem. I am facing the same BC problem, where everything is coupling! 

July 19, 2017, 07:24 

#6 
Senior Member
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 119
Rep Power: 9 
did u try groovyBC?


September 24, 2018, 13:15 

#7 
New Member
Emily
Join Date: Nov 2017
Posts: 23
Rep Power: 6 
Hi all,
Has anyone managed to implement a system of equations for a boundary condition? I am trying to implement a system nonlinear inhomogeneous partial DE's too and would appreciate any guidance. Thank you, E 

January 28, 2021, 09:46 

#8  
Member
Andrea Di Ronco
Join Date: Nov 2016
Location: Milano, Italy
Posts: 54
Rep Power: 7 
Quote:
may I ask you if you managed to implement the solution of a differential equation on a boundary? I'd need something similar (indeed simpler than your problems, i.e. I have a single linear equation in time, at least for now). I thought of "manual" time integration, as it is seemingly also done in the "advective" BC mentioned in previous replies. If you have any advice it would be much appreciated Thanks, Andrea 

Tags 
boundary conditions, equations, nonlinear, partial, system 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Micro Scale Pore, icoFoam  gooya_kabir  OpenFOAM Running, Solving & CFD  2  November 2, 2013 14:58 
Extremely slow simulation with interDyMFoam  jrrygg  OpenFOAM Running, Solving & CFD  9  April 23, 2013 11:14 
SLTS+rhoPisoFoam: what is rDeltaT???  nileshjrane  OpenFOAM Running, Solving & CFD  4  February 25, 2013 05:13 
Computational time  sunnysun  OpenFOAM Running, Solving & CFD  5  March 16, 2009 04:32 
Differences between serial and parallel runs  carsten  OpenFOAM Bugs  11  September 12, 2008 12:16 