|
[Sponsors] |
March 4, 2014, 02:54 |
cyclic boundary condition
|
#1 |
Member
Kan
Join Date: Feb 2014
Location: Australia
Posts: 54
Rep Power: 12 |
Dear OpenFoamer,
I've tried to write this cyclic or periodic boundary condition code by myself. For the velocity between two connected surface, I use the transformation matrix to change the direction of velocity. In order to calculate this matrix, the normal and tangent vectors of surface should be inputted. For instance, nA = [-sin(theta_A), cos(theta_A), 0.0] t1A = [cos(theta_A), sin(theta_A), 0.0] however, there is certain error between real value of nA and calculated one. if theta_A = 30 degree. cos(theta_A) should be equal to sqrt(3)/2, but for the double type value in C++, the calculated result of cos(theta_A) is slightly different from real value, and then make the mass flux through two connected surfaces different. So how can I fix this bug? Thanks in advance |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Understanding the cyclic boundary condition | leroyv | OpenFOAM Running, Solving & CFD | 10 | May 31, 2020 09:05 |
mixed inflow/outflow downstream boundary condition question | peob | OpenFOAM Running, Solving & CFD | 3 | February 3, 2017 10:54 |
cyclic boundary condition | flotran | OpenFOAM | 3 | December 19, 2011 20:13 |
can I use cyclic boundary condition to modeling axisymmetric flow ? | mechy | OpenFOAM | 0 | July 8, 2011 14:16 |
cyclic boundary condition doesn't work in a tube ?? | Cyp | OpenFOAM | 6 | April 16, 2010 15:21 |