|
[Sponsors] |
December 19, 2019, 22:23 |
How to assign value in OpenFOAM
|
#1 |
Senior Member
Nguyen Duy Trong
Join Date: Apr 2014
Posts: 124
Rep Power: 12 |
Hi everyone,
I have a problem related to assign value in OpenFOAM, the detail is as follow: in interFoam solver, two variable alpha1 and alpha2 are defined as: volScalarField& alpha1(mixture.alpha1()); volScalarField& alpha2(mixture.alpha2()); Now, I declare a variable with same type as: volScalarField H ( IOobject ( "H", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), alpha1 ); to compute something. After computation, I want to reassign value of alpha1 by H as: alpha1 = H; However, my assignment did not work since when I check the printed output of two files alpha1 and H, the value in same cell mesh are not identical as shown in the attachement. Could anyone help me to explain the reason for that. I thank you very much in advance. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM 5.0 Released | CFDFoundation | OpenFOAM Announcements from OpenFOAM Foundation | 11 | June 5, 2018 23:48 |
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin | CFDFoundation | OpenFOAM Announcements from Other Sources | 0 | January 4, 2017 06:15 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 13:36 |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 05:36 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 14:25 |