# Boundary condition for fourth order differential equation

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

 March 23, 2015, 11:26 Boundary condition for fourth order differential equation #1 Member   Join Date: Mar 2015 Posts: 36 Rep Power: 11 Dear Foamers, actually i am a bit confused of OpenFoam's implementation of boundary conditions. Actually I have to solve the followong pDGL for my concentration profile: fvm::ddt(c) == fvm::laplacian(D, "laplacian(c)") (+ other terms) with D as diffusion coefficient in form of a volScalarField In this pDGL fourth order derivative with respect to space (and some mixed derivatives) are present, but OpenFoan uses only one boundary condition for the c-Field. How can this work and is there an easy way to implement the second boundary condition? Or more detailed: What happens in the fvm::laplacian( ... "laplacian")? The best way would be to output the CEqn in matrix-form to an external file like the c-Field. Has anybody of you ever done this? (Btw.: An explicit treatment is already working like A = fvc::laplacian(C) and fvm::ddt(c) == fvc::laplacian(D,A) with seperated BC to c- and A-field. The question is about the implicit treatment to use Crank-Nicolson in the end and become second order acurate in time.) Thanks for any comments. tom_flint2012 likes this.

 May 12, 2015, 09:25 #2 Member   Join Date: Mar 2015 Posts: 36 Rep Power: 11 I think, I "solved" the problem on my own. The matrix structure of OpenFoam (LDU-matrix) does not allow to use the neighbour of a neighbour for discretisation. Only the direct neighbour can be used, so the normal "laplace"-operator is the highest possible implicit derivative. Therefore a higher implicit derivative is only possible by rewriting all matrix classes and the used solver. tom_flint2012 and jobin2600 like this.

 Tags boundary-conditions, crank-nicolson, fourth order pdgl