CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Solution diverges at the corner of orthogonal mesh (https://www.cfd-online.com/Forums/openfoam-solving/164849-solution-diverges-corner-orthogonal-mesh.html)

amir.a.aliabadi January 3, 2016 20:07

Solution diverges at the corner of orthogonal mesh
 
4 Attachment(s)
Hello Dear FOAMers,

I have been benefiting from this forum a lot, and would like to seek your help in my problem. I am simulating air flow in an urban canyon by establishing a pressure differential (0.5 divided by density) across the canyon and implementing cyclic boundary conditions on inlet/outlet as well as front/back of my domain. See pictures attached. I have a heated bottom (street) to 352.15 K, adiabatic walls, and ambient temperature and roof temperatures equal to 293.15 K.

I have compiled a solver to combine functionalities of buoyant boussinesq approximation, LES turbulence model, Pimple algorithm, and passive scalar transport. The mesh is generated using blockMesh and y+ is close to 1 to ensure the boundaries are resolved.

The code works fine except that in one cell in a corner, and only one corner of my orthogonal mesh, the solution for temperature starts diverging. The solver operates under PISO model, and I have tried under-relaxing pressure. But this problem persists no matter how hard I try.

Would anyone please make a suggestion? I have attached pictures of the mesh and the diverging corner. I have also attached all files from the solver as well as the case files...

I appreciate your help...
Amir

tomf January 6, 2016 05:45

Hi,

I suspect it may be related to the pRefCell that you set in fvSolution. Since you use cyclics on inlet and outlet you need to have a reference pressure somewhere. I guess your diverging cell is cell 0. Maybe it helps to use a pRefPoint somewhere in the center of the domain or in a location where the pressure is steady.

Code:

PIMPLE
{
    momentumPredictor no;
    nOuterCorrectors 1;
    nCorrectors    2;
    nNonOrthogonalCorrectors 0;
    pRefCell        0;
    pRefValue      0;
}


amir.a.aliabadi January 6, 2016 10:10

Hello Dear Tom,

Thank you for your effective suggestion and I appreciate your time. I changed the pRefCell to a middle point on the topLid of the domain with pRefValue of 0. The solution in the corner at pRefCell = 0 is now well behaved. However, the solution at and around the new pRefCell shows similar effect to the old corner cell. Again I get some cooling in the cell with starts to propagate in the neighbouring cells. I am wondering why this is happening at the pRefCell.

My colleague suggested having maximum temperature range in the entire domain up to 15 K for the use of Boussinesq approximation to be valid. I also ensure that for the PISO algorithm the Courant number is around 0.2. Do you think this may be cause by pRefCell being at the boundary? Shall I move this point to the centre of the domain somewhere?

Regards,
Amir

tomf January 6, 2016 10:56

Dear Amir,

Well at least we know that the error stems from the pRefCell. I suspect that if you change it to the middle of the domain you will have similar behavior. I know this has been discussed before on the forum (google site:cfd-online.com temperature anomaly pressure reference cell).

Best solution would probably to fix the pressure on a boundary, so the reference cell pressure is not set during the computation, but this may interfere with your cyclic pressure jump. I have not done something like this myself so unfortunately all I can do is give some pointers.

Regards,
Tom

amir.a.aliabadi January 6, 2016 14:54

Hello Dear Tom,

Thank you for the follow up and referring me to other discussions. I found them very useful.

Regards,
Amir

Akshay January 7, 2016 09:38

Hello Amir

I think Tom has pointed in the right direction. I would also suggest trying to run this case using a compressible solver. This would take out the Pressure referencing adjustment at the matrix level.

amir.a.aliabadi January 12, 2016 16:19

Hello Dear Colleagues,

Let me thank you all for making such effective comments. So I moved to a compressible solver "buoyantPimpleFoam" provided by OpenFOAM with a tutorial under heatTransfer folder. This solver has the capability to be adapted to LES, which I successfully implemented. In order to get the cyclic inlet/outlet with a pressure jump working, I had to use the cyclic boundary condition "fixedJump" in OpenFOAM 3.0.1. Surprisingly the "fan" boundary condition does not work properly in this version of OpenFOAM, but the "fixedJump" is working suitably. I will post any other updates that I may find useful to other users with the same problem.

Regards,
Amir

Mojtaba.a June 10, 2016 05:58

Just to mention, I have been struggling with the same problem for such a long time and I found Ashkay's comment quite helpful. Using compressible solver instead of the Boussinesq version of incompressible solvers, solved my long-lasting unsolved mystery!

Best.

amir.a.aliabadi June 14, 2016 10:50

Thanks Mojtaba,

Yes, it was suggested to me before that the compressible solver does not suffer from this limitation. However, it had its own issues for me, for example subtle density differences in natural ventilation problems with minor temperature gradients cause other types of problems. I really hope that open foam developers will enable this solver for periodic BC at inlet/outlet, i.e. somehow the need for a fixed pressure boundary be removed for this solver.

Best,
aaa

visheshkapoor06 June 27, 2016 02:07

Dear All,

I am trying to run a case of chtMultiRegionSimpleFoam based on multiRegionHeaterRadiation case. I am facing the problem of U & p diverging for pRef cell.
I tried the following but no help.
1. Changed the location of pRefCell to inside the domain as well as on a inlet with calculated p condition.
2. tried using binary instead of ASCII
3. changed write precision to 12
changed divSchemes to linear.
4. Increased maxIter to 1000.

None of the above has helped. Please tell me how to sort the problem?
Should i try running the case using version 2.4.0 instead of 3.0.1?

Regards
Vishesh

amir.a.aliabadi June 27, 2016 05:29

Hello Vishesh,

You can try two more ideas:

1- Use a compressible solver, rhoFoam, etc... for your problem instead of an incompressible solver. Many users have reported that his has solved this problem for them.

2- Try these links:
https://www.youtube.com/watch?v=qTYAr8jgViM.
http://openfoamtribulations.blogspot...pyhexmesh.html

Amir


All times are GMT -4. The time now is 23:50.