|
[Sponsors] |
Create a volScalarField from a dictionary variable |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 10, 2023, 13:30 |
Create a volScalarField from a dictionary variable
|
#1 |
New Member
Jesus
Join Date: Sep 2021
Posts: 11
Rep Power: 5 |
Dear Foamers:
During the execution of my program, I create a dictionary with the same structure than p file, which means: Code:
{ dimensions [0 2 -2 0 0 0 0]; internalField uniform 101325; boundaryField { upperwall { type fixedFluxPressure; value $internalField; } lowerwall { type fixedFluxPressure; value $internalField; } column { type fixedFluxPressure; value $internalField; } inlet { type fixedFluxPressure; value $internalField; } outlet { type fixedValue; value $internalField; } defaultFaces { type empty; } } } |
|
January 11, 2023, 02:53 |
|
#2 |
Member
Join Date: Jan 2022
Location: Germany
Posts: 72
Rep Power: 4 |
According to the doxygen you have either the option of IOobject or a copy construct.
https://cpp.openfoam.org/v10/classFo...tricField.html |
|
January 13, 2023, 08:20 |
|
#3 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
Look for the "Construct from dictionary" in the header. Eg,
Code:
//- Construct from dictionary GeometricField ( const IOobject& io, const Mesh& mesh, const dictionary& dict ); Just make certain that your IOobject has the NO_READ option. |
|
Tags |
dictionary, ioobject, volscalarfield |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to create initiate a volScalarField p without reading from disk NO_READ does not seem to work | dbxmcf | OpenFOAM Running, Solving & CFD | 14 | March 25, 2022 07:08 |
Error Illegal dictionary entry or environment variable name | gotterstab | OpenFOAM | 0 | February 4, 2022 10:41 |
Unhandled variable DPM-dist | mahesh248f1 | FLUENT | 4 | July 15, 2021 11:50 |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 07:09 |
[blockMesh] Include list of points | Hikachu | OpenFOAM Meshing & Mesh Conversion | 0 | June 20, 2011 10:03 |