|
[Sponsors] |
Creating a control from fvSolution before the mesh creation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 5, 2018, 19:28 |
Creating a control from fvSolution before the mesh creation
|
#1 |
Member
Martin
Join Date: Dec 2011
Posts: 40
Rep Power: 14 |
Hi ! I know this question may result trivial, but I could not manage to do it.
I need to read the fvSolution dictionary without using a reference to the mesh. This is why: I was creating the control as: Code:
const dictionary& vmfControl = mesh.solutionDict().subDict("VMF"); Code:
const dictionary& vmfControl = mesh[i].solutionDict().subDict("VMF"); EDIT: I have created a dictionary using Time as a register Code:
IOdictionary vmfControl ( IOobject ( "vmf", runTime.system(), runTime, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); Thanks in advance. |
|
October 8, 2018, 10:53 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi,
the mesh is not required, but you need other objects (that are stored inside the mesh object). To get an idea, you have to look into the Doxygen source code guide (https://cpp.openfoam.org/v6/classFoam_1_1IOobject.html). Here you see the different constructors for the IOobject object. So basically, the mesh will deliver the const objectRegistry ®istry object. So what you can do is, first build an objectRegistry object and use it for constructing your IOdictionary; cf. https://cpp.openfoam.org/v6/classFoa...tRegistry.html
__________________
Keep foaming, Tobias Holzmann |
|
October 8, 2018, 11:59 |
|
#3 |
Member
Martin
Join Date: Dec 2011
Posts: 40
Rep Power: 14 |
Hi Tobi, thanks for your answer. I have used runTime, which is a registry object. Its being a hard work to dig all OF source code...
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Creating very fine, high accuracy mesh with snappyHexMesh | JD_Welch | OpenFOAM Meshing & Mesh Conversion | 10 | July 5, 2023 12:50 |
[blockMesh] Segmentation Fault when creating block mesh topography (blockMesh) | jbrydg01 | OpenFOAM Meshing & Mesh Conversion | 2 | May 11, 2017 06:37 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 10:38 |
[ICEM] Problem making structured mesh on a surface | froztbear | ANSYS Meshing & Geometry | 4 | November 10, 2011 09:52 |