CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Initialize a Field reading from a table

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 25, 2017, 13:06
Default Initialize a Field reading from a table
  #1
New Member
 
Simone Colucci
Join Date: Mar 2016
Location: Pisa (Italy)
Posts: 23
Rep Power: 10
S.Colucci is on a distinguished road
Hi,
I'm trying to understand how to initialize a Field by looking into a table. For example, I have a Field for indexes like this ( dimensionedScalar("one", dimless, 1) is just an example, values can vary from cell to cell)
Quote:
volScalarField k_index
(
IOobject
(
IOobject::groupName("k_index", this->pair_.name()),
this->pair_.phase1().mesh().time().timeName(),
this->pair_.phase1().mesh()
),
this->pair_.phase1().mesh(),
dimensionedScalar("one", dimless, 1)
);
and I want to create an other Field, called F, reading the k_index entries in a table
Quote:
volScalarField Fsaturation
(
IOobject
(
IOobject::groupName("prova", pair.name()),
pair.phase1().mesh().time().timeName(),
pair.phase1().mesh()
),
pair.phase1().mesh(),
??? table[k_index] ???
);
Anybody know how to do that?

Thanks

Simone
S.Colucci is offline   Reply With Quote

Reply


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
problems after decomposing for running alessio.nz OpenFOAM 7 March 5, 2021 04:49
[Commercial meshers] fluentMeshToFoam: "fluent patch type shadow not recognised" preibie OpenFOAM Meshing & Mesh Conversion 28 March 29, 2017 04:56
OpenFOAM floating point Error upuli OpenFOAM Programming & Development 5 June 20, 2016 03:19
Coupling two unequal dimension meshes. RaghavendraRohith OpenFOAM Programming & Development 7 June 14, 2014 11:40
Field Function for interpolating a table to regulate a mass-flow Eike STAR-CCM+ 0 August 7, 2012 03:59


All times are GMT -4. The time now is 19:56.