
[Sponsors] 
Simulating flow for rotating cylinders with a stationary body in the annulus 

LinkBack  Thread Tools  Display Modes 
October 31, 2013, 02:41 
Simulating flow for rotating cylinders with a stationary body in the annulus

#1 
Member
Anant Diwakar
Join Date: Jan 2013
Posts: 68
Rep Power: 5 
Hi,
I wanted to ask that can Rotating frame of reference approach be used to solve a flow problem consisting of a stationary body located in the annulus of two rotating cylinders ? The schematic of the problem is attached with the post. Thanks Anant 

November 5, 2013, 19:44 

#2 
Super Moderator
Thomas D. Economon
Join Date: Jan 2013
Location: Stanford, CA
Posts: 267
Rep Power: 6 
Hi Anant,
You may want to give the new moving walls option in V2.0.8 a try for this problem. You could impose the two rotational velocities of the outer walls and leave the body fixed in the internal portion of the domain. For some examples of these new options, please see the presentation and materials from our workshop that are posted here: http://su2.stanford.edu/documents/SU...edAnalysis.pdf & http://su2.stanford.edu/documents/SU...ced_Topics.zip. All the best, Tom 

November 14, 2013, 11:19 

#3 
Member
Anant Diwakar
Join Date: Jan 2013
Posts: 68
Rep Power: 5 
Hi Thomas
I was trying to run the case for flow in the annulus of two rotating cylinders using the moving wall strategy. But the solver is showing "nonphysical points" during the run. I wanted to know how we can give user defined initial conditions (like exponentially increasing pressure from inner to outer rotating wall) for the simulation ? something like Pressure initialization P = p_inner_wall*exp(A*(r^2/r_inner^21)) where p_inner = 3.29 N/m2 and A = 0.284 ; r = radius of any point in the annulus; r_inner = radius of inner rotating wall Velocity initialization V_swirl = r * angular_velocity I tried modifying restart file and rerunning the case, but that didn't work. I am attaching the log file and the .cfg file with the post. Thanks Anant 

November 19, 2013, 18:14 

#4 
Super Moderator
Thomas D. Economon
Join Date: Jan 2013
Location: Stanford, CA
Posts: 267
Rep Power: 6 
Hi Anant,
We regularly use the routine CEulerSolver::SetInitialCondition(CGeometry **geometry, CSolver ***solver_container, CConfig *config, unsigned long ExtIter) in the file solver_direct_mean.cpp in order to set initial conditions. Please see that routine for more details, as I suspect that you can easily add your custom initial conditions there. All the best, Tom 

November 23, 2013, 06:52 

#5 
Member
Anant Diwakar
Join Date: Jan 2013
Posts: 68
Rep Power: 5 
Hi Tom
I tried to implement user defined initial condition by adding following lines in the routine CEulerSolver::SetInitialCondition(CGeometry **geometry, CSolver ***solver_container, CConfig *config, unsigned long ExtIter) in the file solver_direct_mean.cpp Code:
if ((ExtIter == 0) && (!restart)) { if (nDim == 2){ cout << "2D not allowed " << endl; exit(0); } cout << " DEBUG : setting initial conditions for rotating flow " << endl; double xCoords, yCoords, zCoords, radius, pressure, v_swirl_y, v_swirl_z; double p_inner = 3.29, A = 0.284, omega = 628.57, radius_inner = 0.3; for (iMesh = 0; iMesh <= config>GetMGLevels(); iMesh++) { for (iPoint = 0; iPoint < geometry[iMesh]>GetnPoint(); iPoint++) { xCoords = geometry[iMesh]>node[iPoint]>GetCoord(0); yCoords = geometry[iMesh]>node[iPoint]>GetCoord(1); zCoords = geometry[iMesh]>node[iPoint]>GetCoord(2); radius = sqrt( yCoords * yCoords + zCoords * zCoords ); v_swirl_y = 1.0 * omega * zCoords; v_swirl_z = 1.0 * omega * yCoords; pressure = p_inner * exp( A * ( ( radius * radius ) / ( radius_inner * radius_inner )  1.0) ); //cout << " pressure = " << pressure << " radius : " << radius << endl; solver_container[iMesh][FLOW_SOL]>node[iPoint]>SetSolution(0, pressure); solver_container[iMesh][FLOW_SOL]>node[iPoint]>SetSolution(1, 0.0); solver_container[iMesh][FLOW_SOL]>node[iPoint]>SetSolution(2, v_swirl_y); solver_container[iMesh][FLOW_SOL]>node[iPoint]>SetSolution(3, v_swirl_z); //solver_container[iMesh][FLOW_SOL]>node[iPoint]>SetSolution_Old(0, pressure); //solver_container[iMesh][FLOW_SOL]>node[iPoint]>SetSolution_Old(1, 0.0); //solver_container[iMesh][FLOW_SOL]>node[iPoint]>SetSolution_Old(2, v_swirl_y); //solver_container[iMesh][FLOW_SOL]>node[iPoint]>SetSolution_Old(3, v_swirl_z); } solver_container[iMesh][FLOW_SOL]>Set_MPI_Solution(geometry[iMesh], config); solver_container[iMesh][FLOW_SOL]>Set_MPI_Solution_Old(geometry[iMesh], config); } } as intended. Am I doing it correctly ? The mesh and the configuration files can be found here https://www.dropbox.com/sh/n55obxgicmwfwfk/911XVDCFW The run.log file is also attached. Thanks Anant 

December 10, 2013, 06:09 

#6 
Member
Anant Diwakar
Join Date: Jan 2013
Posts: 68
Rep Power: 5 
Hi Tom
Did you see my previous post ? I am still facing the problem regarding setting initial conditions. Anant 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
How to visualize the solid body in multiphase flow grid?  asoltoon  OpenFOAM PostProcessing  2  February 2, 2013 13:40 
Turbulent flow over a blunt body Error Message  pradon16  FLUENT  0  July 27, 2012 16:31 
Review: Reversed flow  CRT  FLUENT  0  July 20, 2012 13:03 
Convergence Problem with body force driven flow  Jinfeng  FLUENT  1  December 9, 2009 04:54 
Simulation of Flow induced vibration on an elastically mounted bluff body in a cross  pradeepta  FLUENT  2  September 17, 2009 07:18 