|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Waleed Khalid
Join Date: Nov 2017
Posts: 17
Rep Power: 9 ![]() |
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: ![]() in file db/dictionary/primitiveEntry/primitiveEntry.C at line 297. FOAM aborting [stack trace] can you tell me, what is the issue. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 |