CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Error Writing Foam data (http://www.cfd-online.com/Forums/openfoam-solving/60630-error-writing-foam-data.html)

vatant March 29, 2005 19:48

Hello, I compiled lesI
 
Hello,


I compiled lesInterfoam and started my case. I go t the following error:

--> FOAM FATAL IO ERROR : cannot open file

file: ../tutorials/lesInterFoam/jetbreak/2.18818e-09/pd at line 0.

Function: regIOobject::readStream(const word&)
in file: db/regIOobject/regIOobjectRead.C at line: 68.

FOAM exiting


What is going wrong here ? I copied the available case file nozzleflow2d into another case file and ran the simulation.

Also, I want to know if the currently existing LES simulation can be used for compressible liquids ?


Thanks

Vatant

henry March 30, 2005 03:35

Is 2.18818e-09 your start time
 
Is 2.18818e-09 your start time or did this error occur after a while?

Try switching off runTimeModifiable in controlDict.

lesInterfoam is written based on interFoam which is an incompressible VOF code.

vatant March 30, 2005 10:02

My start Time is zero and afte
 
My start Time is zero and after the first iteration I got this error.(i started with default initial time step of 1e-08).

Also, given a volScalarField, is it possible to convert it to a dimensionedScalar at the given cell?


Thanks

Vatant

henry March 30, 2005 10:07

Did switching off runTimeModif
 
Did switching off runTimeModifiable work?

The cell value returned by [] is a scalar but you can convert it into a dimensionedScalar:

dimensionedScalar(field.name(), field.dimensions(), field[celli])

vatant March 30, 2005 11:57

No, i tried to switch off my r
 
No, i tried to switch off my runtimeModifiable in controlDict.

Also, i reduced my time step size and got the same problem.

--> FOAM FATAL IO ERROR : cannot open file

file: ../run/tutorials/lesInterFoam/jetbreak/2.18818e-09/pd at line 0.

Function: regIOobject::readStream(const word&)
in file: db/regIOobject/regIOobjectRead.C at line: 68.

FOAM exiting



Is there a way to test whats wrong with writing file options ?


Thanks



Vatant

henry March 30, 2005 13:52

How often are you writing resu
 
How often are you writing results? Every time step?

Are you writing to the disk on the machine you are running on?

vatant March 30, 2005 15:58

I am writing every 1e-06 time
 
I am writing every 1e-06 time step as default indicated in Foam. I tried to decrease time steps, clear data storage etc..still had the same problem.

I might want to add some modication that I inserted and compiled in the multiphase/lesInterFoam.

In the pressure equation. pEqn.H i added an extra term computing ddt(pd)

fvm::laplacian(rUAf, pd) == fvc::div(phi)+comp*fvm::ddt(pd)

where comp = a volScalarField type

Do you think this formulation is creating any problem ?


Thanks

Vatant

henry March 30, 2005 16:05

I doubt it but I guess you hav
 
I doubt it but I guess you have tried with out it to check.

mattijs March 30, 2005 17:47

Hi Vatant, about your writi
 
Hi Vatant,

about your writing problems: have you tried increasing the writePrecision? (6 by default)

You say you are writing every 1E-6 but your error lists 2.18818e-09 so I guess your time step gets adapted and becomes very small. There might also be problems when you hit timesteps on the order of 1E-15.

vatant March 30, 2005 21:24

I set the write precision to 8
 
I set the write precision to 8. My minimal dt = 1e-09 and i enforce the courant condition ~ 0.5 actually decreased to 0.2 to check the difference.

Do you think, it has anything to do with files mismanagement ..im sure I have no problem but if you think I should look into the files system again.

I was thinking that this error was due to error in reading dictionary or objects like in correctPhi.H ,,where pd.objects() comes into calculations.

Any thoughts about this Dr.Weller ?

henry March 31, 2005 03:34

Do you get the same problem wh
 
Do you get the same problem when running standard lesInterFoam on the same case?

vatant March 31, 2005 20:44

I dint make a backup copy ..i
 
I dint make a backup copy ..i however tried to recompile lesInterFoam to see what is the cause of the problem.

I got it compiled but had the following warnings:

createFields.H: In function `int main(int, char**)':
createFields.H:2: warning: unused variable 'nGammaCorr'
createFields.H:7: warning: unused variable 'nGammaSubCycles'
createFields.H:2: warning: unused variable 'nGammaCorr'
createFields.H:7: warning: unused variable 'nGammaSubCycles'
../OpenFOAM/OpenFOAM-1.0/src/cfdTools/lnInclude/readPISOControls.H:3: warning: unused variable 'nCorr'


Could you help me fixing these warnings ? or is it ok to have these warnings during compilation.



Regards,



Vatant

vatant April 1, 2005 13:32

I made some changes and remove
 
I made some changes and removed some errors except one with the 'ncorr'. In the createFields.H, i inserted a volScalarField...

volScalarField scalar
(
IOobject
(
"scalar"
runTime.timeName(),
runTime,
IOobject::NO_READ
IOobject::NO_WRITE
)
(..)
)
I compiled the code and used this volScalarfield in calculation.

The code ran but gave the following error:

--->FOAM Warning : ObjectRegistry::checkIn(regIOobject&):
Registering object '..' with objectRegistry 'time'
This is only appropriate for registering the regions of a multi-region computation or in other special circumstances.
otherwise please register this object with it's region (mesh)


If we create a volScalarField how should it be registered to Mesh type ?


Vatant

henry April 1, 2005 14:36

This issue is covered in the r
 
This issue is covered in the release notes:

OpenFOAM-1.1/ReleaseNotes-1.1

vatant April 5, 2005 11:41

Thanks Dr.Weller, I was able t
 
Thanks Dr.Weller, I was able to Fix the changes. I have another question on fixing patches.

I converted a fluentMesh to foam and wanted a liquid inlet for simulating a jet using lesInterFoam. In gamma BC, I set inlet value = 1
and then started the code.

In the beginning, i got a message

No Target Patch Present.

My code ran for some time and diverged. Same code that I ran for the test case converged.

In my case, I have flow travelling a small distance inside nozzle and then ejecting into air, while in the les test case, you have a patch field set up.

Do I have to set any patch field ,for a case like simulating a flow coming out of a nozzle ?

I modified all the variables : the inlet was a pressure inlet not an velocity inlet.

Also, Dr.weller, How do you initialize K with given U value in the inlets ? (relation between K and U ?? ) If it is a pressure inlet , how to initialize K ?

In my case, I modified K to a very low value , since the pressure chamber has total pressure associated with it.


Thanks


Vatant


All times are GMT -4. The time now is 22:30.