CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   tangential laplacian, BC (https://www.cfd-online.com/Forums/openfoam-programming-development/204269-tangential-laplacian-bc.html)

Kombinator July 18, 2018 15:29

tangential laplacian, BC
 
Dear all,

I am new with openFOAM and I am trying to implement the following boundary condition at the conducting wall:

\frac{\partial\varphi}{\partial n} = a\cdot\nabla^{2}_{t}\varphi
where \varphi is electric potential, a is constant, \nabla^{2}_{t}\varphi is tangential Laplacian at the wall.

I wonder if anybody has an idea about the following question:
Is it possible to find tangential Laplacian at the wall in openFOAM and if so - how? I guess that it is only possible to find normal Laplacian, but I will be happy if I am wrong. Thanks in advance.

Best regards,
Tar

cesk March 5, 2022 17:21

tangential laplacian
 
Hi,

I know it is an old post but, I am currently working on the same topic.
The boundary condition can be created inheriting from fixedGradient.
My idea to obtain the tangential components is applying the laplacian to the field, get its value at the boundary and then substract the second derivative of the normal component.

One way to obtain the second derivative is:
Code:

.
.
.

 const volScalarField& PotE = this->db().objectRegistry::lookupObject<volScalarField> ("PotE");
volVectorField gradPotE = fvc::grad(PotE);
const vectorField& Sf = patch().Sf(); // surface face vector area
const scalarField& magSf = patch().magSf(); // surface area magnitute
vectorField normFace = Sf/(magSf+SMALL);

// second derivative of normal component

scalarField normGradPotE = gradPotE.boundaryField()[patchi].snGrad() & normFace


.
.
.
.

// update of gradient (lapPotEw is the laplacian at the boundary
gradient()= cWall_*(lapPotEw - normGradPotE);




I am unfortunately running into divergence problem in my code.
By the way, the tangential components of a vector can be extracted as:
Code:

n ^ (n ^ v)
where n is the normal vector direction. But you should apply the divergence to this vector that happens to be a vector field. So, don't know



Hope that this can help!


Hopefully somebody else has a better idea









cfdInCivil July 23, 2024 11:17

tangential BC for laplacian
 
Hi,


I am also working on it. Is there any update on it?


Wondering if there is not already something available... :confused:

cesk July 23, 2024 11:48

tangential BC for laplacian
 
Unfortunately, my approach happened to be unstable. If you are working on thin wall boundary condition for MHD, I think the best approach is solving both solid and fluid, i.e. using a conjugated solver


All times are GMT -4. The time now is 19:30.