|
[Sponsors] |
Custom boundary condition - how to use indices? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 18, 2014, 13:09 |
Custom boundary condition - how to use indices?
|
#1 |
New Member
Mehdi Famouri
Join Date: Jan 2011
Posts: 12
Rep Power: 15 |
Hey guys, I'm trying to use indices to define a fixed value boundary conditions but I have no idea how to, check this out:
========== forAll(*this, i) { scalar yy=patch().Cf()[i].component(1); operator[i]== (n*0); if (yy < .03) { operator[i]= (n*(-0.005)); } if (yy > .07 ) { operator[i]= (n*(.005)); } } ========== Of course, the use of "[i]" is totally inappropriate. Just wanted to make sure y'all understand what I'm looking for! But I did accomplished a mixed boundary conditions. I basically looking for something like this: ========= forAll(*this, i) { scalar yy=patch().Cf()[i].component(1); this->refValue()[i]= vector::zero; this->refGrad()[i] = vector::zero; this->valueFraction()[i] = 1.0; if (yy < .03) { this->refValue()[i]= n*UUU1; this->refGrad()[i] = vector::zero; this->valueFraction()[i] = 1.0; } if (yy > .07 ) { this->refValue()[i]= n*UUU2; this->refGrad()[i] = vector::zero; this->valueFraction()[i] = 1.0; } } ========= Thank you for your attention Mehdi |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sigSEGV error + custom boundary condition in OF 2.3.0 | bharat.gmail | OpenFOAM Programming & Development | 2 | December 19, 2014 07:58 |
conjugate boundary condition | Daniel_Khazaei | OpenFOAM Programming & Development | 0 | December 31, 2013 13:11 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 06:28 |
No-slip condition for non-resolved boundary layer in open channel banks | Lupocci | Main CFD Forum | 1 | January 17, 2013 03:11 |
asking for Boundary condition in FLUENT | Destry | FLUENT | 0 | July 27, 2010 00:55 |