CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Correct format to read internalField data from a file

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 16, 2020, 04:09
Default Correct format to read internalField data from a file
  #1
Member
 
ishan
Join Date: Oct 2017
Posts: 78
Rep Power: 9
ishan_ae is on a distinguished road
Hello.

I wan to read internalField data for my rhoSimpleFoam from simpleFoam run.

I tried using this format for the data file but OF6 complains that it could not read the token:
Code:
initial_kineticEnergy
List<scalar>
43843
(
.993
.9954
..
.....
)
;
So I added this at the start of the file but then OF complains to add the dimension to it:
Code:
FoamFile
{
     version     2.0;
     format      ascii;
     class        volScalarField;
     location    "237";
     object       k;
}
I am using that kinetic energy data file using the "#include file_name" command in the k BC file.

Whats the correct format when using such data files?

Some information on this would be helpful.
ishan_ae is offline   Reply With Quote

Old   October 16, 2020, 07:09
Default
  #2
Member
 
ishan
Join Date: Oct 2017
Posts: 78
Rep Power: 9
ishan_ae is on a distinguished road
I just had to read the terminal warnings carefully.

The class should be "IOobject" and not "volScalarField","volVectorField", etc.

That fixed the problem.
ishan_ae is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFoam "Permission denied" and "command not found" problems. iyidaniel@yahoo.co.uk OpenFOAM Running, Solving & CFD 11 January 2, 2018 07:47
polynomial BC srv537 OpenFOAM Pre-Processing 4 December 3, 2016 10:07
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 17:02
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 07:42
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 12:32


All times are GMT -4. The time now is 21:15.