CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Questions about Time Directories (https://www.cfd-online.com/Forums/openfoam/118650-questions-about-time-directories.html)

xCray May 31, 2013 16:06

Questions about Time Directories
 
Hi, I'm a student who is new to OpenFoam.

I have 6 time directories (10.000, 10.001, 10.002, ..., 10.005)

I used "pimpleFoam" funtion to generate 10.001 ~ 10.005 directories using the initial 10.000 directory.

In each of these directories, there are dictionaries such as p, phi, and U.

Each of them contain its own Dimentions, internalFields (non uniform), and Boundary conditions.

My goal is to test IF I remove all the internalFields of each dictionaries(p,U,phi) of time directories from 10.001 to 10.005, and run the simulation by the function "icoFoam," it would PRODUCE a internalField in the 10.005 time directory.

However, when I run the icoFoam function, it gives me an error saying:

"Create time

Create mesh for time = 10.005

Reading transportProperties

Reading field p

--> FOAM FATAL IO ERROR:
keyword internalField is undefined in dictionary "10.005/p"
"

I was wondering if I need to provide a space for the data to be written on.
So I have tried providing an empty array of internalField, but still gives me an error.

What could I do to fix this?

Also, this is my first time asking any question. Is there any more information that I should provide? Apologies if the question isn't clear!

Thank you so much!

fumiya May 31, 2013 23:52

Hi John,

Welcome to the Forum:)

I understand you are trying to compare the results obtained by icoFoam with by pimpleFoam.
The simplest and straightforward way is to copy the three directories 10.000, constant, and system
and create a new case icoFoam_case(name it as you like) and run the icoFoam. So, there are two cases:

icoFoam_case/{10.000, constant, system}: You'll run icoFoam here
pimpleFoam_case/{10.000, 10.001, 10.002, ..., 10.005, constant, system}: You've already run the pimpleFoam here

As to the error message, I think it occured because you set "startFrom" to "latestTime" and
deleted the dictionary internalFields in the latest time 10.005 in your case.

Hope this helps,
Fumiya

xCray June 1, 2013 00:23

Thank you so much for your kind answer!

It helped a lot and I was able to make some progress.

However, the "error" part still seems to be unsolvable for me.

You have mentioned that "As to the error message, I think it occured because you set "startFrom" to "latestTime" and deleted the dictionary internalFields in the latest time 10.005 in your case."

Is there any ways I could fix it?

I should have mentioned what my goals were more clearly.

It is to try editing the U files from a few directories, say all the ones following 10.002, changing, for example:

INLET
{
type fixedValue;
value uniform (0.2 0 0);
}

to

INLET
{
type fixedValue;
value uniform (0.3 0 0);
}


And see if there is any changes in result at 10.005.

I was told, for each of the new folders that I created in advance (or simply deleted the content from the first run), include copies of the results files (p, phi, U) containing only:
1) the header as in folder 10.000/ up to and including line "dimensions [...]"
2) jump over the internalField (do not include it)
3) the final part, from "boundaryField" on to the end.

And copy these 3 shortened files into each of the directories (folders) and see, if the program runs as usual (using icoFoam).

I have currently copied all shortened files into each of the directories. But the program seems to be not running as usual (the error occurs).

Could you give me some help one more time?

fumiya June 1, 2013 00:34

Quote:

2) jump over the internalField (do not include it)
You have to include the "internalField" to run the solvers.
It specifies the initial condition.

Hope this helps,
Fumiya


All times are GMT -4. The time now is 10:41.