CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Read Mechnical properties by a file

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2024, 06:29
Default Read Mechnical properties by a file
  #1
New Member
 
Waleed Khalid
Join Date: Nov 2017
Posts: 17
Rep Power: 9
Waleed Khalid is on a distinguished road
I want to read mechanical properties of solid plate by a (TXT) file.

First i perform simulation using soliddisplacementFOam solver.
Then i extracted data and done some post processing in python and find destruction function.
and once again, i computed Young,s modolous on each node of the grid.

Now i want to assign computed value of young's modolous to each node of the grid by input file.
I am reading file something like this:


Info<< "Reading Young's Modolous\n" << endl;

IOdictionary Eoneone
(
IOobject
(
"Eoneone",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);

const dictionary& EDict(Eoneone.subDict("E"));
word EType(EDict.get<word>("type"));



Info<< "Normalising E : E/rho\n" << endl;
volScalarField E(E/rho);

Info<< "Calculating Lame's coefficients\n" << endl;

volScalarField mu(E/(2.0*(1.0 + nu)));
volScalarField lambda(nu*E/((1.0 + nu)*(1.0 - 2.0*nu)));




and my file look like this:


FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object Eoneone;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


E List<scalar>
8320
(
1.131487997071458130e+11
1.139058556890173035e+11
1.149208782435540009e+11
1.153799377912179871e+11
1.156207393834956970e+11
1.157595200925080414e+11
1.158454442595783997e+11
1.159019171809296722e+11
1.159408410968761902e+11
1.159687605523255310e+11
1.159909585874398804e+11

.........
);

while compiling, there is no such error.
But when i run the simulation, this error occurs.


Create time

Create mesh for time = 0

Reading mechanical properties

Reading Young's Modolous



--> FOAM FATAL ERROR: (openfoam-2312)
Attempt to return primitive entry ITstream : /home/waleedkhalid/OpenFOAM/waleedkhalid-v2312/run/solidDisplacementFoam/mycase/constant/Eoneone/E, line 19, IOstream: Version 2.0, format ascii, line 19, OPENED, GOOD
primitiveEntry 'E' comprises
on line 19: compound of type List<scalar>
as a sub-dictionary

From virtual Foam::dictionary& Foam:rimitiveEntry::dict()
in file db/dictionary/primitiveEntry/primitiveEntry.C at line 297.

FOAM aborting

[stack trace]



can you tell me, what is the issue.
Waleed Khalid is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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.com] swak4foam compiling issues on a cluster saj216 OpenFOAM Installation 5 January 17, 2023 17:05
[Other] Tabulated thermophysicalProperties library chriss85 OpenFOAM Community Contributions 62 October 2, 2022 04:50
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 19:13
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 07:42
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 02:41


All times are GMT -4. The time now is 14:12.