gradientInternalCoeffs cannot be called for a calculatedFvPatchField
hi everybody,
I defined a new solver that solve natural convection in a viscoelastic Fluid. it made successfully, but when I want to run my model the following error was appeared: Code:
--> FOAM FATAL ERROR: Thanks |
DEAR mostafa
could you post your p file here? |
1 Attachment(s)
the attachment contains the p, fvSolution and fvSchemes files.
I changed the floor boundary condition and even delete the p file but this problem didn't had been solve. I think the problem is somewhere in the fvSolution or fvSchemes. |
this solver reads p or p-rgh ?
it seems it reads p, if it reads p! then you should define BC for p, you can not use calculated BC, you should use (fixedValue or fixedGradient) for it :D |
Quote:
|
Dear mostafa let me ask another questions, which version of openfoam do you use?
could you run this test case before heat transfer implementation? put the test case and solver here, then may other can help you |
Hi
Did you set p equal to another field in your solver during calculations? i.g. p=....? |
this is where I use the p in createFields.H:
Code:
Info<< "Calculating field g.h\n" << endl; Code:
p = p_rgh + rhok*gh; |
Hi
I think you have two options two solve the problem. Selection is your choice: 1: volScalarField p ( IOobject ( "p", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); or 2: p == p_rgh + rhok*gh; |
Dear Ata
I applied what you offered me and what Nima said, that error was solved. but after some iterations (50) the following error appeared: Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" again thank you so much |
it seems somewhere in your code something divide on zero or going to result indefinite value
|
Dear adambarfi,
Are you able to resolve your error?
|
Quote:
yes, after some day hard working, finally I could solve it. |
2 Attachment(s)
Quote:
how do you solved this problem?? I have some problem like this,but my problem dont solve by ata or nima offers... I use interPhasechangeFoam solver and modified this solver for my simulation... you can see my creatFields and Peqn |
hi Sasan,
I get your attached files and I couldn't find any thing that made error! so, attach your log file + the errors expression |
1 Attachment(s)
Quote:
Thank you for reply.. my error: FOAM FATAL ERROR: gradientInternalCoeffs cannot be called for a calculatedFvPatchField on patch left of field p in file "/home/Sasan/Desktop/HardtMix/stephanProblem/0/p" You are probably trying to solve for a field with a default boundary condition. and attach the log file |
You have to specify correct boundary conditions for p otherwise you cannot solve the pEqn!
The error message gave you already a hint what you have to do: Code:
on patch left of field p in file "/home/Sasan/Desktop/HardtMix/stephanProblem/0/p" try other boundary conditions that are compatible with your solution. |
Quote:
I used this test case with another solver and dont have problem,But for new solver,I have this problem. my BC is not calculated....!! you can see: |
1 Attachment(s)
Quote:
|
mhmm, I think there are problems with p BCs.
the userGuide says: Quote:
Also, I can't understand these conditions you used for p_rgh: Code:
type buoyantPressure; Code:
type buoyantPressure; |
I send for you
|
Quote:
I try this BCs,but the problem is still. first I try this boundary condition: type buoyantPressure; value uniform 0; and This type zeroGradient; but no answer...:confused: NOTE:my case is 1D and I think should use this BCs Regards, |
Hey guys, I am ran into something similar for a conjugate heat transfer problem. In my case it says:
--> FOAM FATAL ERROR: gradientInternalCoeffs cannot be called for a calculatedFvPatchField on patch leftWall of field h in file "/home/meisu/OpenFOAM/meisu-2.2.1/run/Research/ConjugateHeatTransfer/RayleighBenard/caseFourDomeFourWalls/0/leftWall/h" You are probably trying to solve for a field with a default boundary condition. From function calculatedFvPatchField<Type>::gradientInternalCoef fs() const in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 199. The question I have is what h file is OpenFOAM referring to? I only don't have any h scripts. Thanks! |
Hey guys,
I solved the problem. I did not spell correctly the name of my boundary condition. It should have been labeled as leftWall instead of leftwall. Silly mistakes can consume a lot of time :D. |
Hi Mostafa ,
I have some questions with the following code in createFields.H . ANd I look forward to your help . 1. regarding this code "p_rgh + rhok*gh" , rhok is calculated from temperature T , so it is different in different position , why can we use this formula for uniform rho ? Quote:
Quote:
Quote:
Zhipeng |
Hi Zhipeng and welcome
1- remember the momentum equation and the Boussinesq approximation for naural convection: for the case of constant density and gravity, the term can be written as grad(), where r is the position vector. then is the hydrostatic pressure, and it's convenient- and for numerical solution more efficient- to define as the head and use it in place of the pressure. In variable density flows, one can split the term into two parts: . for more information you can refer to Ferziger's textbook (computational methods for fluid dynamics). 2-3 The solver needs to know what and where the reference pressure is. according to the explanation in 1 and below quote, I think you can get the answer of your questions. Quote:
http://foam.sourceforge.net/docs/cpp/a02937.html Bests, Mostafa |
Hi , Mostafa ,
Thank you for your help , and I have understand the question , but I can understand the following code in pEqn.H , though I have read the link you telll me . Quote:
Thanks Zhipeng |
the explanation of this algorithm here for me is not very easy!! so I attach you a note about the SIMPLE algorithm for pressure-velocity coupling and 4 links about the PISO and SIMPLE algorithm and the implementation of them with OF:
https://www.dropbox.com/s/lplecnozku...MPLEslides.pdf The_SIMPLE_algorithm_in_OpenFOAM The_PISO_algorithm_in_OpenFOAM BuoyantBoussinesqPisoFoam SIMPLE_algorithm hope they can help you |
same error for [b]h[/b] file.. but I don't have such file in my [b]0[/b] folder
Hello, I have the same error posted before: Code:
--> FOAM FATAL ERROR: Why is it looking for the h file? Best, Lisandro |
Just as a matter of fact, I solved the issue above by changing the BC type of N2 (inert specie) in the Outlet patch. It was calculated and I put zeroGradient and I got no errors anymore.
Lisandro |
All times are GMT -4. The time now is 03:21. |