|
[Sponsors] |
Does sampleDict have limitation in number of fields? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 18, 2018, 13:45 |
Does sampleDict have limitation in number of fields?
|
#1 |
New Member
|
Hi,
I have 32 fields which I would like to monitor using sampleDict. The issue is that I get error when I have 32 fields added in sampleDict but when I remove any of them (it does not matter which one) it works fine. To me it is really strange. Is there any limitation on the number of fields which can be added to sampleDict? sampleDict: Code:
sets ( nearTop { type uniform; axis xyz; start ( 10 20 0.5 ); end ( 20 20 0.5 ); nPoints 5; } nearBottom { type uniform; axis xyz; start ( 10 90 0.5 ); end ( 20 90 0.5 ); nPoints 5; } ); fields (C_S_su C_S_aa C_S_fa C_S_va C_S_bu C_S_pro C_S_ac C_S_h2 C_S_ch4 C_S_ic C_S_in C_S_i C_X_c C_X_ch C_X_pr C_X_li C_X_su C_X_aa C_X_fa C_X_c4 C_X_pro C_X_ac C_X_h2 C_X_i C_S_cat C_S_an C_S_va_ion C_S_bu_ion C_S_pro_ion C_S_ac_ion C_S_hco3_ion C_S_nh3); Code:
Time = 10 Reading fields: volScalarFields: C_S_i C_S_aa C_S_hco3_ion C_S_cat C_S_pro C_S_fa C_S_ac_ion C_S_nh3 C_S_pro_ion C_X_su C_X_h2 C_S_an C_X_c C_S_bu_ion C_X_aa C_X_i C_S_ic C_S_bu C_X_c4 C_X_pro C_S_va C_X_ch C_S_in C_S_su C_S_ac C_X_li C_S_ch4 C_X_pr C_X_ac C_S_h2 C_S_va_ion C_X_fa Executing functionObjects --> FOAM Warning : From function void Foam::sampledSets::writeSampleFile(const Foam::coordSet&, const Foam::PtrList<Foam::sampledSets::volFieldSampler<T> >&, Foam::label, const Foam::fileName&, const Foam::writer<Type>&) [with Type = double; Foam::label = int] in file sampledSet/sampledSets/sampledSetsTemplates.C at line 161 File "/home/rigel/openFOAM/runJune/New/Cases/CASE/postProcessing/sampleDict/10/nearTop_C_S_su_C_S_aa_C_S_fa_C_S_va_C_S_bu_C_S_pro_C_S_ac_C_S_h2_C_S_ch4_C_S_ic_C_S_in_C_S_i_C_X_c_C_X_ch_C_X_pr_C_X_li_C_X_su_C_X_aa_C_X_fa_C_X_c4_C_X_pro_C_X_ac_C_X_h2_C_X_i_C_S_cat_C_S_an_C_S_va_ion_C_S_bu_ion_C_S_pro_ion_C_S_ac_ion_C_S_hco3_ion_C_S_nh3.xy" could not be opened. No data will be written --> FOAM Warning : From function void Foam::sampledSets::writeSampleFile(const Foam::coordSet&, const Foam::PtrList<Foam::sampledSets::volFieldSampler<T> >&, Foam::label, const Foam::fileName&, const Foam::writer<Type>&) [with Type = double; Foam::label = int] in file sampledSet/sampledSets/sampledSetsTemplates.C at line 161 File "/home/rigel/openFOAM/runJune/New/Cases/CASE/postProcessing/sampleDict/10/nearBottom_C_S_su_C_S_aa_C_S_fa_C_S_va_C_S_bu_C_S_pro_C_S_ac_C_S_h2_C_S_ch4_C_S_ic_C_S_in_C_S_i_C_X_c_C_X_ch_C_X_pr_C_X_li_C_X_su_C_X_aa_C_X_fa_C_X_c4_C_X_pro_C_X_ac_C_X_h2_C_X_i_C_S_cat_C_S_an_C_S_va_ion_C_S_bu_ion_C_S_pro_ion_C_S_ac_ion_C_S_hco3_ion_C_S_nh3.xy" could not be opened. No data will be written End |
|
June 19, 2018, 09:46 |
|
#2 |
Senior Member
|
Hi,
I think, it is limitation of a file system (file name length, ex. https://serverfault.com/questions/95...imits-on-linux). sample utility object reads all field names normally, but when it tries to create output file, it fails. |
|
June 20, 2018, 06:20 |
|
#3 | |
New Member
|
Quote:
Thank you for your reply. You are right. I reduced the fields' names and now it works fine. Bests, Reza |
||
April 22, 2020, 14:24 |
|
#4 |
Member
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7 |
Hey there,
I don't know if this is still relevant but maybe someone will someday face the same problem that I did. I wanted to output a very high number (~1000) of fields in sets to postprocess them in a second step. Due to the maximum file name limit and the naming convention of OF output files when sets are created, it is impossible to write everything in one file. So I wrote a small script that basically ensures that all fields are divided in various (sub) sets functionObjects so that the maximum file name length is kept smaller than 255. The script must of course be modified to consider your personal field names and set data. It writes an outputfile "manyFieldsFO" (manyFields-FunctionObject) in the system folder of your case. This file can then be included in the controlDict file in the functions subdict. Code:
functions { #include "${FOAM_CASE}/system/manyFieldsFO" } RP PS 1: it's a python script >> python3 createManyFieldSets.py PS 2: Somehow, It is not possible to attach python scripts. I had to zip it. PS 3: If any OF-dev reads this - I know it is a niche but it would be nice to be able to specify an alternative output file name to bypass this problem. |
|
Tags |
sampledict |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
decomposePar no field transfert | Jeanp | OpenFOAM Pre-Processing | 3 | June 18, 2022 13:01 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
decomposePar -allRegions | stru | OpenFOAM Pre-Processing | 2 | August 25, 2015 04:58 |
foam-extend_3.1 decompose and pyfoam warning | shipman | OpenFOAM | 3 | July 24, 2014 09:14 |
[blockMesh] --> foam fatal error: | lillo763 | OpenFOAM Meshing & Mesh Conversion | 0 | March 5, 2014 11:27 |