CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Reading a field(?) within a dictionary (https://www.cfd-online.com/Forums/openfoam-programming-development/138943-reading-field-within-dictionary.html)

ecbmxer July 14, 2014 16:21

Reading a field(?) within a dictionary
 
I'm having some trouble reading some dictionary entries into a model I'm working on.

This is a lagrangian simulation, and within my reactingCloud1Properties dictionary, there is a subDict called localInteractionCoeffs (already defined as 'coeffDict()'). I cannot get the data within the sub dictionary below that ("patches"). It has '(' braces instead of '{', so it isn't a dictionary entry, right? Subdict doesn't work. However, the next level down, does contain dictionary entries, which I want. I just cannot seem to figure out what type of data this is so that I could say:

x = this->coeffDict().lookup("patches");

And then do another lookup or subdict to get values for a specific patch name (which I already know).

Any thoughts?

----------------------------------------------------------------------

localInteractionCoeffs
{
particleProperties
{
youngsModulus (1E8 5 1);
poissonsRatio (0.33);
surfaceEnergy (0);
}
patches
(
inlet
{
type escape;
}
outlet
{
type escape;
}
walls
{
type escape;
}
nozzleBottom
{
type escape;
}
coupon
{
type deposit;
e 0.1;
mu 0.1;

youngsModulus 1E9; // Pa
poissonsRatio 0.3;
surfaceEnergy 0; // J/m2
}
);
}


All times are GMT -4. The time now is 07:31.