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

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

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: 7
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
Attached Files
 schematic_annulus.pdf (6.5 KB, 29 views)

 November 5, 2013, 19:44 #2 Super Moderator   Thomas D. Economon Join Date: Jan 2013 Location: Stanford, CA Posts: 271 Rep Power: 8 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: 7
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
"non-physical 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^2-1)) 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
Attached Images
 mesh.jpg (93.7 KB, 8 views)
Attached Files
 rotating_annulus.cfg.txt (10.9 KB, 3 views) log.txt (8.2 KB, 1 views)

 November 19, 2013, 18:14 #4 Super Moderator   Thomas D. Economon Join Date: Jan 2013 Location: Stanford, CA Posts: 271 Rep Power: 8 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: 7
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);

}
}```
But it doesn't seems to initialize the pressure and velocity values
as intended. Am I doing it correctly ?

The mesh and the configuration files can be found here
https://www.dropbox.com/sh/n55obxgicmwfwfk/911XVD-CFW

The run.log file is also attached.

Thanks
Anant
Attached Files
 log.txt (7.7 KB, 0 views)

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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post asoltoon OpenFOAM Post-Processing 2 February 2, 2013 13:40 pradon16 FLUENT 0 July 27, 2012 16:31 CRT FLUENT 0 July 20, 2012 13:03 Jinfeng FLUENT 1 December 9, 2009 04:54 pradeepta FLUENT 2 September 17, 2009 07:18

All times are GMT -4. The time now is 16:14.

 Contact Us - CFD Online - Privacy Statement - Top