|
[Sponsors] |
Difference between forAll(boundary...) and operator==(..) in custom boundary |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 31, 2022, 11:33 |
Difference between forAll(boundary...) and operator==(..) in custom boundary
|
#1 |
Senior Member
TWB
Join Date: Mar 2009
Posts: 402
Rep Power: 19 |
Hi,
I wanted to create a custom inlet U BC which changes with time and I'm trying to use the codedFixedValue method. I come across 2 ways to modifly the inlet U: 1. Code:
time = this->db().time().value(); const fvPatch& boundaryPatch = patch(); vectorField& field = *this; forAll(boundaryPatch, faceI) { field[faceI] = vector( starting_incoming_vel*time, 0,0); } Code:
cur_incoming_vel = vector( starting_incoming_vel*time, 0,0); operator==( cur_incoming_vel ); Thanks |
|
|
|