CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Unexplained Error (https://www.cfd-online.com/Forums/openfoam/81855-unexplained-error.html)

nakul November 9, 2010 04:05

Unexplained Error
 
Hi,

I am trying to run a case but I am getting the following error:

FOAM FATAL ERROR:

gradientInternalCoeffs cannot be called for a calculatedFvPatchField
on patch hole of field (hs-(p|rho)) in file "/home/iist/OpenFOAM/nakul-1.7/newappl/0/(hs-(p|rho))"
You are probably trying to solve for a field with a default boundary condition.


I am not being able to understand what it means. I am getting it right after one iteration.

Any help is appreciated.

Nakul

herbert November 9, 2010 04:20

Hi Nakul,

that means, that you are trying to solve an eqation for a field without having boundary conditions specified. Because the expression (hs-p|rho) is mentioned, I think that you are solving for a field derived inside the solver.

What you can do is to let the field be read from a file 0/"yourFieldName", where you can specify the BCs. After reading it this way you can modify the internal field as you did until now. (i.e. "yourField" = hs-p/rho)

Regards,
Stefan

nakul November 9, 2010 04:27

Thanx Herbert !!

That reply was quite useful. Actually I defined a new volScalar field e=hs-(p/rho), where e is the sensible internal energy.

So am I correct in saying that this problem will be resoved if I define a file named "e" in 0 directory and specify boundary conditions for "e" in it ?

Nakul

nakul November 9, 2010 04:32

Besides there is one more problem that I don't have any specific boundary conditions for this internal energy.
I defined this variable only becuase I needed it in my energy equation and it is not defined in the class hsCombustionThermo.

So is there any way by which I can get around this problem?

herbert November 9, 2010 05:09

Quote:

Originally Posted by nakul (Post 282727)
So am I correct in saying that this problem will be resoved if I define a file named "e" in 0 directory and specify boundary conditions for "e" in it ?

Of course you have to add a read constructor in your createFields.H
Code:

    volScalarField e
    (
        IOobject
        (
            "e",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        mesh
    );

Regards,
Stefan


All times are GMT -4. The time now is 06:34.