
[Sponsors] 
pUCoupledFoam with Multiple Reference Frames (MRF) 

LinkBack  Thread Tools  Search this Thread  Display Modes 
June 25, 2014, 20:40 
pUCoupledFoam with Multiple Reference Frames (MRF)

#1 
New Member
Chris
Join Date: Jan 2012
Posts: 17
Rep Power: 13 
Greetings All!
I'm very excited about the latest release of foam3.1. I see that the long awaited coupled / block matrix solver has been added to the library. However, it doesn't look like there's a compiled version with multiple reference frame (MRF) capability. My question is, would it be just as simple as taking the MRF lines of code from MRFSimpleFoam and plugging it into the pUCoupledFoam, merging the dependencies between the two solvers, and compiling the new solver (say MRFpUCoupledFoam)? Also, if you were to include the unsteady capabilities from, say, pimpleDyMFoam into the code, would the end result be similar to CFX's steadystate solver with pseudotimescale or FLUENT's Coupled PseudoTransient method, where the chosen pseudo timestep acts as a relaxation factor? Just wanted to bounce the idea around before I try to compile something silly. lol 

November 14, 2014, 05:21 

#2 
Member
Christian
Join Date: Apr 2014
Posts: 74
Rep Power: 11 
That would be an interesting solver to develop, did anyone tried to compile it?


November 18, 2014, 05:37 

#3 
Member
Christian
Join Date: Apr 2014
Posts: 74
Rep Power: 11 
I compiled the solver, it is incredibly slow but converges with very few iterations compared to MRFSimpleFoam,
If anyone is interested in testing it let me know! 

November 18, 2014, 17:36 

#4 
New Member
Chris
Join Date: Jan 2012
Posts: 17
Rep Power: 13 
Can I give it a try? I had compiled a version shortly after my first post, and I had some problems with convergence with the problem I was studying compared to the results I got from MRFSimpleFoam. If I remember correctly, I couldn't get the multigrid solver to work correctly either.


November 19, 2014, 04:45 

#5 
Member
Christian
Join Date: Apr 2014
Posts: 74
Rep Power: 11 
Sure send me an email I will send it to you  then please let me know how it goes and if you think it should be improved!


November 19, 2014, 09:58 

#6 
New Member
Chris
Join Date: Jan 2012
Posts: 17
Rep Power: 13 
I sent you a PM with my email. Thank you!


November 20, 2014, 13:09 

#7 
Member
Christian
Join Date: Apr 2014
Posts: 74
Rep Power: 11 
Did you get it? how is it going?


November 20, 2014, 16:23 

#8 
New Member
Chris
Join Date: Jan 2012
Posts: 17
Rep Power: 13 
I got it, thank you! Running through my first test case. It may take a few days to run the simulation and check the results out and compare with MRFSimpleFoam


November 20, 2014, 19:05 

#9  
New Member
Chris
Join Date: Jan 2012
Posts: 17
Rep Power: 13 
One thing I did manage to figure out was why I kept getting the error:
Quote:
http://sourceforge.net/p/openfoamex...ndrelease/248/ From the explanation given there, when the code was update to rid it's dependence of the finiteVolume library the error occurred. Fortunately, the ticket has proposed a solution in a text file "bugFixProcessorBlockAMG.patch." If you make the changes and recompile the source, the Block AMG solver will work in parallel. I tested it on the example backwardFacingStepTurbulent tutorial for pUCoupledFoam. However, I'm having difficulty getting it to work with my test case for this MRFpUCoupledFoam solver. I immediately get a floating point error. I'll try playing around with it as well, but the BiCGStab solver seems to be stable and solving this test case. 

November 21, 2014, 05:50 

#10 
Member
Christian
Join Date: Apr 2014
Posts: 74
Rep Power: 11 
Allright interesting, in fact I did not use the AMG solver as it wasn't working properly, so now I know why!
What case are you simulating? Could it be a boundary condition problem? Let me know how the test goes and would you send me the updated code when you got it to work? 

December 3, 2014, 09:48 

#11 
New Member
Chris
Join Date: Jan 2012
Posts: 17
Rep Power: 13 
I have completed one tests of this new MRFpUCoupledFoam solver. The computation was carried out on a small, propellertype hydrokinetic turbine similar to what's pictured below:
The mesh is a tetrahedral mesh generated with ANSYS meshing, with a conformal mesh between the turbine domain and the river/channel domain. The "Free Surface" was modeled as a nondeformable slip wall. A rotating reference frame was used in the turbine domain and the absolute reference frame in the river/channel domain. More information about the boundary conditions and the problem setup can be found in my recent publication: http://www.sciencedirect.com/science...60148114007472 (doi:10.1016/j.renene.2014.11.032). Note that that the unit studied in that manuscript is different then the one presented in this post. The units in the manuscript also used a structured hexahedral mesh. I did a result comparison between MRFpUCoupledFoam and MRFSimpleFoam. Both simulations used the same mesh and boundary conditions and schemes. Both simulation were calculated on the same PC and decomposed with the same number of processes. They were both ran for 1000 iterations. The solvers were different. Pictured below are the residual plots for the MRFpUCoupledFoam solver: Pictured below are the residual plots for the MRFSimpleFoam solver: For the same number of iterations, the coupled solver had lower residuals; however, it took longer for the coupled solver to obey continuity than the MRFSimpleFoam solver. This may just be due to the different solvers used in the fvSolution file. The execution time for the MRFpUCoupledFoam solver was 22660.96 s and 11660.8 s for the MRFSimpleFoam solver. The forces on the turbine blades for the MRFpUCoupledFoam solver were predicted to be: Code:
forces output: forces(pressure, viscous)((0.35897795 0.063049842 168.78056) (0.0084648028 0.0011228238 1.1589041)) moment(pressure, viscous)((0.10147754 0.049363351 6.1399811) (0.00013767574 0.00035465256 0.37919792)) Code:
forces output: forces(pressure, viscous)((0.150706 0.102579 168.551) (0.00871071 0.00162742 1.157)) moment(pressure, viscous)((0.0502227 0.0337058 6.11785) (8.06596e05 0.000381771 0.378728)) 

December 3, 2014, 10:03 

#12 
Member
Christian
Join Date: Apr 2014
Posts: 74
Rep Power: 11 
Very good! Results are very close, we just need to find out how to speed up the solver then!
Any ideas about what can cause those oscillations in Up[1] and Up[3] ? 

December 3, 2014, 11:02 

#13 
New Member
Chris
Join Date: Jan 2012
Posts: 17
Rep Power: 13 
Yes, I'm pretty sure it's because of the relTol I set on the Up solver. When I had that set to 0, I think I didn't see those oscillations. I set the relTol to 0.001 to speed up the computation time. Here's the fvSolution file I used:
Code:
/** C++ **\  =========    \\ / F ield  foamextend: Open Source CFD   \\ / O peration  Version: 3.1   \\ / A nd  Web: http://www.extendproject.de   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class dictionary; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { Up { solver BiCGStab; preconditioner Cholesky; tolerance 1e09; relTol 0.001; minIter 1; maxIter 500; } /* Up { solver AMG; cycle Fcycle; coarseningType AAMG; norm componentNorm; normComponent 0; nPreSweeps 0; nPostSweeps 3; nFinestSweeps 30; groupSize 2; minCoarseEqns 4; nMaxLevels 100; scale on; smoother ILU; minIter 0; maxIter 100; tolerance 1e18; relTol 0.001; } */ // Segregated p { solver GAMG; tolerance 1e18; relTol 0.001; smoother GaussSeidel; nPreSweeps 1; nPostSweeps 3; nFinestSweeps 30; cacheAgglomeration true; nCellsInCoarsestLevel 240; agglomerator faceAreaPair; mergeLevels 1; } U { solver GAMG; tolerance 1e18; relTol 0.01; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 3; nFinestSweeps 30; cacheAgglomeration true; nCellsInCoarsestLevel 240; agglomerator faceAreaPair; mergeLevels 1; } k { solver GAMG; tolerance 1e18; relTol 0.01; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 3; nFinestSweeps 30; cacheAgglomeration true; nCellsInCoarsestLevel 240; agglomerator faceAreaPair; mergeLevels 1; } omega { solver GAMG; tolerance 1e18; relTol 0.01; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 3; nFinestSweeps 30; cacheAgglomeration true; nCellsInCoarsestLevel 240; agglomerator faceAreaPair; mergeLevels 1; } } blockSolver { } relaxationFactors { U 0.75; p 0.75 k 0.8; omega 0.8; } SIMPLE { nNonOrthogonalCorrectors 20; } // SIMPLE // relaxationFactors // { // p 0.3; // U 0.7; // k 0.7; // epsilon 0.7; // } // ************************************************************************* // 

December 3, 2014, 16:21 

#14 
Member
Christian
Join Date: Apr 2014
Posts: 74
Rep Power: 11 
Did you check the difference between AMG and BiCGStab for Up?


December 3, 2014, 16:55 

#15 
New Member
Chris
Join Date: Jan 2012
Posts: 17
Rep Power: 13 
This is funny. Right after you posted I checked the AMG solver and it started working for this problem! I'd much rather use the multigrid method. I'll play around with the solver settings to see what's up


December 4, 2014, 10:41 

#16 
New Member
Chris
Join Date: Jan 2012
Posts: 17
Rep Power: 13 
Just tried to use the MRFpUCoupledFoam solver on my problem with ggi interfaces. For some reason, it looks like information isn't being passed between interface zones. Running this with MRFSimpleFoam works fine.


December 5, 2014, 11:47 

#17 
Member
Christian
Join Date: Apr 2014
Posts: 74
Rep Power: 11 
I am getting a similar problem with pimpleDyMFoam + GGI, not sure how to solve it.
I'll see if I can solve it then I'll help you 

September 14, 2015, 06:46 

#18 
Senior Member
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 140
Rep Power: 16 
How complex is to include pU coupling into an reference solver?
I want to check pUCoupling over pimpleDyMFoam. Could you share MRFpUCoupledFoam to check it? Best Regards 

September 14, 2015, 08:53 

#19 
Member
Christian
Join Date: Apr 2014
Posts: 74
Rep Power: 11 
be_inspired, if you could couple it with pimpleDyMFoam that would be great.
PorscheGTIII, could you send the solver to be_inspired? 

March 9, 2016, 02:56 

#20 
Member
Cameron
Join Date: Jul 2012
Posts: 33
Rep Power: 13 
Did any of you have any luck with the AMG solver for this case? I've just compiled an SRF version of pUcoupledfoam which works for the tutorial cases, but keeps diverging on my problem.


Tags 
block matrix, coupled solver, mrfsimplefoam, mrfzones, pucoupledfoam 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Second Derivative Zero  Boundary Condition  fukipa  OpenFOAM  11  March 27, 2021 04:28 
OpenFOAM 1.6ext git installation on Ubuntu 11.10 x64  Attesz  OpenFOAM Installation  45  January 13, 2012 12:38 
Error with Wmake  skabilan  OpenFOAM Installation  3  July 28, 2009 00:35 
OpenFOAM on MinGW crosscompiler hosted on Linux  allenzhao  OpenFOAM Installation  127  January 30, 2009 19:08 
G95 + CGNS  Bruno  Main CFD Forum  1  January 30, 2007 00:34 