|
[Sponsors] |
Something strange with p_rgh Boundary Condtion setup for OF2.3x and up!!!! |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 29, 2015, 09:54 |
Something strange with p_rgh Boundary Condtion setup for OF2.3x and up!!!!
|
#1 |
Member
Mahmoud Aboukhedr
Join Date: Feb 2014
Location: London
Posts: 40
Rep Power: 12 |
Hello All friends,
As you know with new updates for OF versions not everything work smoothly. I'm working constantly with interfoam and lots of updates in micro flow applications. Anyway All my updates in the code and test case set-up was done in 2.2x ... Recently I updated all my codes and test cases to 2.3x, but I kept the old BC files for the test cases as following p_rgh Code:
inlet_liquid { type fixedFluxPressure; value uniform 0; } inlet_gas { type fixedFluxPressure; value uniform 0; } outlet { type fixedValue; value uniform 0; } wall_1 { type fixedFluxPressure; value uniform 0; } Code:
inlet_liquid { type fixedValue; value uniform (0.106 0 0); } inlet_gas { type fixedValue; value uniform (0 0 -0.344); } outlet { type pressureInletOutletVelocity; value uniform (0 0 0); } wall_1 { type fixedValue; value uniform (0 0 0); } But for OF23x it gives me error Code:
updateCoeffs(const scalarField& snGradp) MUST be called before updateCoeffs() or evaluate() to set the boundary gradient. From function fixedFluxPressureFvPatchScalarField::updateCoeffs( ) in file fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C at line 151. maybe its a very easy problem, that I need to change something with the schemes Any help from the expatriates will be great Mahmoud |
|
December 30, 2015, 10:31 |
|
#2 |
Senior Member
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 200
Rep Power: 18 |
Hi Mahmoud,
Recently I adapted the spillway tutorial (https://www.hpc.ntnu.no/display/hpc/OpenFOAM+-+Spillway+Tutorial), to version 2.3. I noticed that in 2.3 the boundary condition for p_rgh at inlet, outled and walls was replaced by zeroGradient as is done in the weirOveflow tutorial. Another problem that I noticed is that it is very difficult to get convergence using the fixed value condition for U, at the water inlet, I had to replace it with the variableHeightFlowRateInletVelocity. I suppose something similar may happen in your case. Best Regards, Paulo |
|
January 1, 2016, 15:02 |
|
#3 |
Member
Mahmoud Aboukhedr
Join Date: Feb 2014
Location: London
Posts: 40
Rep Power: 12 |
Dear Paulo,
Thanks for the update, I think the fixedFluxPressure tretment method had ben changed from 2.2x to 2.3x .. am still not sure how to fix it to be honest . |
|
January 1, 2016, 15:30 |
|
#4 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
pimpleFoam has the following change in 2.3.x: https://github.com/OpenFOAM/OpenFOAM...46e787db50c95a The code for "interFoam/pEqn.H" also has the following: Code:
// Update the fixedFluxPressure BCs to ensure flux consistency setSnGrad<fixedFluxPressureFvPatchScalarField> ( p_rgh.boundaryField(), ( phiHbyA.boundaryField() - fvOptions.relative(mesh.Sf().boundaryField() & U.boundaryField()) )/(mesh.magSf().boundaryField()*rAUf.boundaryField()) ); And I quote: Quote:
Bruno
__________________
|
||
January 9, 2017, 08:31 |
|
#5 | |
New Member
vijay chauhan
Join Date: Dec 2016
Posts: 2
Rep Power: 0 |
Quote:
I hope I can help a bit. I found a similar problem running lagrangian sprayFoam solver which I have modified little bit. What I observed was that, as mentioned by Bruno, setSnGrad<fixedFluxPressureFvPatchScalarField> is missing in some solver pEqn.H. I simply copied it from other solver pEqn.H where it exists and carefully changes variable names according to your solver. It runs well for me. Then wmake. Also dont forget to #include "fixedFluxPressureFvPatchScalarField.H" in solver file. Hope it works. |
||
|
|