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

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

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2013, 02:41
Default Simulating flow for rotating cylinders with a stationary body in the annulus
  #1
Member
 
Anant Diwakar
Join Date: Jan 2013
Posts: 68
Rep Power: 13
diwakaranant is on a distinguished road
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
File Type: pdf schematic_annulus.pdf (6.5 KB, 39 views)
diwakaranant is offline   Reply With Quote

Old   November 5, 2013, 19:44
Default
  #2
Super Moderator
 
Thomas D. Economon
Join Date: Jan 2013
Location: Stanford, CA
Posts: 271
Rep Power: 14
economon is on a distinguished road
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
economon is offline   Reply With Quote

Old   November 14, 2013, 11:19
Red face
  #3
Member
 
Anant Diwakar
Join Date: Jan 2013
Posts: 68
Rep Power: 13
diwakaranant is on a distinguished road
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
File Type: jpg mesh.jpg (93.7 KB, 10 views)
Attached Files
File Type: txt rotating_annulus.cfg.txt (10.9 KB, 6 views)
File Type: txt log.txt (8.2 KB, 1 views)
diwakaranant is offline   Reply With Quote

Old   November 19, 2013, 18:14
Default
  #4
Super Moderator
 
Thomas D. Economon
Join Date: Jan 2013
Location: Stanford, CA
Posts: 271
Rep Power: 14
economon is on a distinguished road
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
economon is offline   Reply With Quote

Old   November 23, 2013, 06:52
Default
  #5
Member
 
Anant Diwakar
Join Date: Jan 2013
Posts: 68
Rep Power: 13
diwakaranant is on a distinguished road
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
File Type: txt log.txt (7.7 KB, 1 views)
diwakaranant is offline   Reply With Quote

Old   December 10, 2013, 06:09
Default
  #6
Member
 
Anant Diwakar
Join Date: Jan 2013
Posts: 68
Rep Power: 13
diwakaranant is on a distinguished road
Hi Tom

Did you see my previous post ?
I am still facing the problem regarding setting initial conditions.

Anant
diwakaranant is offline   Reply With Quote

Reply


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
Review: Reversed flow CRT FLUENT 1 May 7, 2018 06:36
How to visualize the solid body in multiphase flow grid? asoltoon OpenFOAM Post-Processing 2 February 2, 2013 13:40
Turbulent flow over a blunt body Error Message pradon16 FLUENT 0 July 27, 2012 17:31
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 08:18


All times are GMT -4. The time now is 03:51.