acces to createfields-Volscalarfields
I Have a problem with my driftFluxFoam adaption:
Because of the modular construction of DriftFluxFoam, the viscosity Model has no direct acces to the volScalarFields of createfields. Can somebody help me to initialize a volScalarField out of createFields, or even better, get acces to createFields? |
To solve my problem, i tried to save an load the Objects of a dictionary. Here is my code:
In the end of createfields.H: Code:
IOdictionary bilineardict Code:
const objectRegistry& db = mesh.thisDb(); |
Can you post more of your solver (especially the beginning portion)? I presume you have either
Code:
# include "createMesh.H" Code:
# include "createDynamicFvMesh.H" If you want access to "Konzentration" in the main body of the code, you could use the lines: Code:
volVectorField Konzentration |
In my main function the only thing that comes near to your suggestions is
Code:
#include "createMesh.H" Code:
#include "bilinear.H" If i write Code:
volVectorField Konzentration error: conflicting declaration ‘Foam::volVectorField Konzentration’ ( ^ bilinear/bilinear.C:97:20: error: ‘Konzentration’ has a previous declaration as ‘Foam::volScalarField Konzentration’ volScalarField Konzentration = alpha_*rho_c_; ^ bilinear/bilinear.C:119:13: error: ‘runTime’ was not declared in this scope runTime.timeName(), ^ bilinear/bilinear.C:120:13: error: ‘mesh’ was not declared in this scope mesh, I don´t get these error messages about runTime and mesh in my createFields.H |
Did you forget to include bilinear.H in your .dep file perhaps?
|
Hi SteveFOAM,
Quote:
Quote:
Quote:
regards, teuk |
The previous declaration of Konzentration was a mistake in the code. The inclusion of "fvMesh.H" had not helped me, same error. I want to be clear: I already defined everything properly in createfields. I just want to read them in bilinear.C.
The mesh and the runTime is within the main, but the inclusion of the mixtureViscosityModels is far before this runtime loop (not my idea, its driftfluxFoam) |
All times are GMT -4. The time now is 23:18. |