|
[Sponsors] |
November 8, 2007, 03:04 |
Hi,
I need to share an arra
|
#1 |
Senior Member
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17 |
Hi,
I need to share an array between icoFoam.C and timeVaryingUniformFixedValueFvPathfields.C so that both the codes can update the array during the run. Any Suggestions? Cheers! Senthil |
|
November 8, 2007, 14:59 |
Use a volScalarField (= list o
|
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
Use a volScalarField (= list of scalars). This gets registered on the database which you can access from any boundary condition. See e.g. pressureInletVelocityFvPatchVectorField.C which gets phi from the database. (is surfaceScalarField but the principle is the same)
|
|
November 9, 2007, 00:34 |
Hi Mattijs,
Thanks for the
|
#3 |
Senior Member
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17 |
Hi Mattijs,
Thanks for the help! I was able to create a volScalarField (using createFields.H) basically a replica of -case directory-/0/p file. Not sure if this is the right way! I have modified the TimeVaryingUniformFixedValueFvPathField.H and .C so that it can see the new volScalarField. Success ends here! I am not sure how to write into (neither read from) the database (say the pressure value for a particluar patch into the new volScalarField) both in TimeVaryingUniformFixedValueFvPathFields.C as well as icoFoam.C. I know the new field is availble at both places. Thanks in Advance Senthil |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TimeVaryingUniformFixedValueFvPathField | skabilan | OpenFOAM Running, Solving & CFD | 5 | October 26, 2007 15:19 |