|
[Sponsors] |
April 29, 2022, 10:44 |
Modifying the field matrix for BCs
|
#1 |
Member
Join Date: Mar 2019
Posts: 86
Rep Power: 7 |
Hi
After more than 3 years, I still do not know how to solve for c in a domain with solve ( fvm::ddt(c) + fvm::div(V,c) - fvm::laplacian(D, c) ) ; when the boundary condition dc/dn = Kc + F has also to be taken into consideration (d/dn means derivative in the direction of the normal to the boundary and variables K, F can of course vary along the boundary and variables V and D can vary throughout the domain) Regards to all |
|
April 30, 2022, 05:37 |
|
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 670
Rep Power: 14 |
I'm not surprised - that's a fairly unsual boundary condition. Have you tried a codedMixed boundary type? Seems to me that that would be a great place to start, although I have no idea how stable the boundary condition will be.
|
|
April 30, 2022, 06:30 |
|
#3 |
Senior Member
|
This is a Robin boundary condition implememented in e.g.
https://www.openfoam.com/documentati...alarField.html |
|
May 3, 2022, 11:58 |
|
#4 |
Member
Join Date: Mar 2019
Posts: 86
Rep Power: 7 |
I had already looked into a tutorial on BCs by Guerrero 3 years ago which discussed codedFixed and codedMixed at length but it had nothing to do with
dc/dn = Kc + F On the other hand, I now realize that if I discretize dc/dn = Kc + F then, I can cast it into the form of a Robin boundary equation ! So that will probably solve the problem. Great thanks to you two for replying. However my biggest problem is actually much worse: it involves solving a Poisson equation for the potential over two adjacent media of different dielectric constants where a charge can in addition build up on the interface between the two media. I wonder if I will have to become familiar with block-coupled solvers as discussed in the workshop by Ivor Clifford |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
BCs and the field matrix | celestial | OpenFOAM Running, Solving & CFD | 0 | February 22, 2022 10:48 |
[SOWFA] NREL SOWFA ABLTerrainSolver tutorial problem | cico0815 | OpenFOAM Community Contributions | 36 | February 3, 2022 11:54 |
Access to a field of a lagrangian post-processing cloudFunction | Ake | OpenFOAM Programming & Development | 0 | December 13, 2019 05:46 |
New Solver error Foam::error::printStack | upuli | OpenFOAM Running, Solving & CFD | 4 | May 11, 2018 01:43 |
OpenFOAM floating point Error | upuli | OpenFOAM Programming & Development | 5 | June 20, 2016 03:19 |