|
[Sponsors] |
tableProperties.lookup(Y[i].name()) problem when run my case |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 12, 2013, 04:30 |
tableProperties.lookup(Y[i].name()) problem when run my case
|
#1 | ||
Member
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 12 |
Hi foamer,
The following is my codes in my readTableProperties.H and it can be compiled successfully with my solver. Code:
Info<< "Reading table properties\n" << endl; IOdictionary tableProperties ( IOobject ( "tableProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ); FieldField<Field,scalar> tspecies(19); for (label i=0; i<Y.size(); i++) { scalarField A(tableProperties.lookup("Y[i].name()")); tspecies[i]=A; } Code:
FoamFile { version 2.0; format binary; class dictionary; location "constant"; object tableProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // CH4 ( 0.0000 0.0120 0.0240 0.0360 0.0480 0.0060 0.0720 0.0840 0.0960 0.1080 0.1200 0.1320 0.1440 0.1560 0.1680 0.1800 0.1920 0.2040 0.2160 0.2280 0.2400 0.2520 0.2640 0.2760 0.2880 0.3000 0.3120 0.3240 0.3360 0.3480 0.3600 0.3720 0.3840 0.3960 0.4080 0.4200 0.4320 0.4440 0.4560 0.4680 0.4800 0.5000 0.5250 0.5500 0.5750 0.6000 0.6250 0.6500 0.6750 0.7000 0.7250 0.7500 0.7750 0.8000 0.8500 0.9000 0.9500 1.0001 ); O2 ( 0.0000 0.0120 0.0240 0.0360 0.0480 0.0060 0.0720 0.0840 0.0960 0.1080 0.1200 0.1320 0.1440 0.1560 0.1680 0.1800 0.1920 0.2040 0.2160 0.2280 0.2400 0.2520 0.2640 0.2760 0.2880 0.3000 0.3120 0.3240 0.3360 0.3480 0.3600 0.3720 0.3840 0.3960 0.4080 0.4200 0.4320 0.4440 0.4560 0.4680 0.4800 0.5000 0.5250 0.5500 0.5750 0.6000 0.6250 0.6500 0.6750 0.7000 0.7250 0.7500 0.7750 0.8000 0.8500 0.9000 0.9500 1.0001 ); CO2 ( 0.0000 0.0120 0.0240 0.0360 0.0480 0.0060 0.0720 0.0840 0.0960 0.1080 0.1200 0.1320 0.1440 0.1560 0.1680 0.1800 0.1920 0.2040 0.2160 0.2280 0.2400 0.2520 0.2640 0.2760 0.2880 0.3000 0.3120 0.3240 0.3360 0.3480 0.3600 0.3720 0.3840 0.3960 0.4080 0.4200 0.4320 0.4440 0.4560 0.4680 0.4800 0.5000 0.5250 0.5500 0.5750 0.6000 0.6250 0.6500 0.6750 0.7000 0.7250 0.7500 0.7750 0.8000 0.8500 0.9000 0.9500 1.0001 ); H2O ( 0.0000 0.0120 0.0240 0.0360 0.0480 0.0060 0.0720 0.0840 0.0960 0.1080 0.1200 0.1320 0.1440 0.1560 0.1680 0.1800 0.1920 0.2040 0.2160 0.2280 0.2400 0.2520 0.2640 0.2760 0.2880 0.3000 0.3120 0.3240 0.3360 0.3480 0.3600 0.3720 0.3840 0.3960 0.4080 0.4200 0.4320 0.4440 0.4560 0.4680 0.4800 0.5000 0.5250 0.5500 0.5750 0.6000 0.6250 0.6500 0.6750 0.7000 0.7250 0.7500 0.7750 0.8000 0.8500 0.9000 0.9500 1.0001 ); So lookup (Y[i].name). If I use Code:
scalarField A(tableProperties.lookup("CH4")) Code:
scalarField A(tableProperties.lookup("Y[i].name()")) Quote:
Code:
scalarField A(tableProperties.lookup(Y[i].name())) Quote:
|
|||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
use batch mode to run an unsteady case | PaulineP | FLUENT | 9 | April 4, 2019 09:18 |
Big Difference Between Serial run and Parallel run case | alundilong | OpenFOAM Programming & Development | 1 | March 20, 2013 16:52 |
[blockMesh] Problem with 0012 simple case | Tetragramm | OpenFOAM Meshing & Mesh Conversion | 3 | June 20, 2012 04:44 |
problem when I run the case | Rui | Siemens | 1 | February 1, 2007 07:25 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 13:24 |