|
[Sponsors] |
September 28, 2020, 09:21 |
compute compoents of U
|
#1 |
New Member
zaki
Join Date: Nov 2018
Posts: 17
Rep Power: 7 |
Hello, I want to define new variable in the solver
F=U.component(1)*beta; //beta is an constant but I got an error error: no match for ‘operator=’ (operand types are ‘Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’ and ‘Foam::tmp<Foam::GeometricField<Foam::Vector<doubl e>, Foam::fvPatchField, Foam::volMesh> >’) F=U.component(1)*beta; please any help or suggestion and Thank you . |
|
September 29, 2020, 06:10 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Please provide more information. Which class type is your object F? Is your usage of U.component(1) correct?
Based on Doxygen you do have a volVectorField for the velocity which is a GeometricField (Template Class) while the Type of the template is Vector. Hence, you should get access as given below: Code:
// F has to be a volScalarField with appropriate units F = U.y() * dimensionedScalar()
__________________
Keep foaming, Tobias Holzmann |
|
September 29, 2020, 06:16 |
|
#3 |
New Member
zaki
Join Date: Nov 2018
Posts: 17
Rep Power: 7 |
Thank you very much .
the problem resolved |
|
Tags |
compot u |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
compute compoents of U | zikou55 | OpenFOAM Running, Solving & CFD | 1 | September 29, 2020 04:36 |
Compute mean vorticity field | odellar | OpenFOAM Post-Processing | 8 | January 9, 2017 09:03 |
Compute Cluster with diskless compute nodes | Pauli | Hardware | 0 | October 6, 2015 16:48 |
Cluster ID's not contiguous in compute-nodes domain. ??? | Shogan | FLUENT | 1 | May 28, 2014 15:03 |
How do I compute the normal vector to a surface with FEM | Vasilis | Main CFD Forum | 3 | July 31, 2009 07:59 |