CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

cyclic boundary condition

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 4, 2014, 02:54
Default cyclic boundary condition
  #1
Member
 
Kan
Join Date: Feb 2014
Location: Australia
Posts: 54
Rep Power: 12
nwpukaka is on a distinguished road
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
nwpukaka is offline   Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 06:39.