CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

read IOObject::NO_WRITE/AUTO_WRITE from dictionary

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2015, 12:52
Default read IOObject::NO_WRITE/AUTO_WRITE from dictionary
  #1
Member
 
james wilson
Join Date: Aug 2014
Location: Orlando, Fl
Posts: 39
Rep Power: 12
jameswilson620 is on a distinguished road
All,

I have been working on a server lately and have been running into file limits/quota issues. I have a custom solver with many fileds, written with AUTO_WRITE flag, necessary for debugging. When using this solver on the server, these fields accumulate very fast especially with multiple cores.

I have tested reading a word (AUTO_WRITE or NO_WRITE) from my transport properties and tried to pass this to my IOobject for the fields that i want to selectively write at runtime and have had little success since I cant simply use a word containing the string "NO_WRITE", in place of writing NO_WRITE for the IOobject.

In short, I would like to:

1. at runtime, read a word/string:
Code:
writeSwitch "NO_WRITE";
from transportProperties.

2. take this string and use is as an IOoption, for example:

Code:
volScalarField sensibleCorrectSource
        (
            IOobject
            (
                "sensibleCorrectSource",
                runTime.timeName(),
                mesh,
                IOobject::NO_READ,
                IOobject::writeSwitch //HERE
            ),
                evapm*cp // for dimensions
);
thereby eliminating the need to edit and recompile every time i want to push a copy of my new solver to the server.

I can also imagine a solution where i have two createFields.H files; one that doesn't write every filed and the other that does. I would like to avoid this if at all possible.

Thank you, James
jameswilson620 is offline   Reply With Quote

Reply

Tags
c++, ioobject write, openfoam 2.3.0, read string/word

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
how to calculate mass flow rate on patches and summation of that during the run? immortality OpenFOAM Post-Processing 104 February 16, 2021 09:46
Read properties per component from an input file dictionary Cyp OpenFOAM Programming & Development 29 November 1, 2015 22:41
How to read freestream velocity vector in a new boundary condition? robyTKD OpenFOAM Programming & Development 5 April 24, 2013 10:43
Data Read Error ansys CFX fcabrales CFX 3 April 18, 2011 19:21
Error Fluents TDL FLUENT 6 April 26, 2005 07:02


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