|
[Sponsors] |
Boundary condition with value, gradient and constant/source term |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Arman N
Join Date: Mar 2019
Posts: 13
Rep Power: 7 ![]() |
Hello everyone,
I need to implement a boundary condition which is a combination of the value and gradient of a parameter with a constant/source term. For example, for parameter ![]() ![]() where ![]() ![]() ![]() I wanted to know if there is any BC already available in openFoam for this purpose and if not, how can this be achieved. *PS: I know this can be somehow implemented using the mixed BC when ![]() Any hint is appreciated. Arman |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Join Date: May 2021
Posts: 5
Rep Power: 5 ![]() |
Hi Arman,
You can achieve this by using codeStream. Use codedFixedValue, include necesary libraries and <#include "fvCFD.H"> in the required header files. You can use most of the functions provided in openfoam by this BC. Here is the link for template: https://www.openfoam.com/documentati...xed-value.html |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Arman N
Join Date: Mar 2019
Posts: 13
Rep Power: 7 ![]() |
Hi "abhishekmonu96`",
Thanks for your reply. I'm not really familiar with codeStream but I assume it is an efficient way to tweak your way into custom BCs. I will give it a try! *UPDATE: After all, I did some more searching and found that apparently, wallHeatTransfer BC does something similar to what I'm looking for, which is itself based on the mixed BC. Thank to this post, I was able to figure out how it works and apply my own BC. The mixed BC calculates the value on patch using the following equation: ![]() where ![]() ![]() ![]() ![]() ![]() The main idea is to replace the derivative term with its linear approximation. Therefore, the equation becomes: ![]() reordering into the mixed BC form gives: ![]() Therefore, by assuming ![]() ![]() ![]() Cheers, |
|
![]() |
![]() |
![]() |
Tags |
boundary condition, boundary gradient, boundary value, mixed boundary condition, source term |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Boundary condition with value, gradient and constant | Arman_N | OpenFOAM Programming & Development | 0 | January 25, 2022 14:50 |