CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Modifying the field matrix for BCs

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 29, 2022, 10:44
Default Modifying the field matrix for BCs
  #1
Member
 
Join Date: Mar 2019
Posts: 86
Rep Power: 7
celestial is on a distinguished road
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
celestial is offline   Reply With Quote

Old   April 30, 2022, 05:37
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 670
Rep Power: 14
Tobermory will become famous soon enough
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.
Tobermory is offline   Reply With Quote

Old   April 30, 2022, 06:30
Default
  #3
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 736
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
This is a Robin boundary condition implememented in e.g.

https://www.openfoam.com/documentati...alarField.html
dlahaye is offline   Reply With Quote

Old   May 3, 2022, 11:58
Default
  #4
Member
 
Join Date: Mar 2019
Posts: 86
Rep Power: 7
celestial is on a distinguished road
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
celestial is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 01:25.