|
[Sponsors] |
December 24, 2022, 13:36 |
codedBoundary Condition
|
#1 |
New Member
Rishi Kumar
Join Date: Jun 2022
Posts: 20
Rep Power: 4 |
Hi everyone,
I am trying to implement a time-varying velocity inlet boundary condition. by using codedFixedValue type. But, i am getting the follwing error while compiling, error: return-statement with a value, in function returning ‘void’ [-fpermissive] I have attached my U file also, Please help me out to overcome this error.
__________________
Rishi K. |
|
December 26, 2022, 13:29 |
|
#2 |
Member
Join Date: Jun 2020
Posts: 49
Rep Power: 6 |
I think your error lies in using the "return" statement, since the function is aparently defined as a void (which doesn't have a return value). The C++ source guide gives an example of how to use this type of BC:
https://cpp.openfoam.org/v10/classFo...atchField.html I think, in your case it could look something like: Code:
const scalar t = this->db().time().value(); operator==(<description of U-vector here>); |
|
December 30, 2022, 05:07 |
|
#3 | |
New Member
Rishi Kumar
Join Date: Jun 2022
Posts: 20
Rep Power: 4 |
Quote:
i corrected it,need to rewritr the code with operator. thanks for your help
__________________
Rishi K. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The difference of cyclic boundry condition and mapped boundary condition | caitao | OpenFOAM Running, Solving & CFD | 1 | December 4, 2019 08:29 |
Boundary Condition for Pump simulation for Zero Head Condition | Himanshu_Shrivastava | Main CFD Forum | 0 | March 26, 2017 04:25 |
Similar boundary condition to zero flux condition | Navip | OpenFOAM Running, Solving & CFD | 0 | August 13, 2015 05:04 |
Accessing multiple boundary patches from a custom boundary condition file | ripudaman | OpenFOAM Programming & Development | 0 | October 22, 2014 19:34 |
what "If" condition means in rebound | brbbhatti | OpenFOAM Programming & Development | 0 | August 12, 2014 10:18 |