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

compute compoents of U

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 28, 2020, 09:18
Unhappy compute compoents of U
  #1
New Member
 
zaki
Join Date: Nov 2018
Posts: 17
Rep Power: 7
zikou55 is on a distinguished road
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 .
zikou55 is offline   Reply With Quote

Old   September 29, 2020, 04:36
Default
  #2
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 355
Rep Power: 8
geth03 is on a distinguished road
first of all you need to declare your variable in the following manner:

volScalarfield F(U.component(1)*beta);
geth03 is offline   Reply With Quote

Reply

Tags
comoent velocity


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
Specs for a compute and head nodes rhythm Hardware 3 August 14, 2020 08:55
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


All times are GMT -4. The time now is 15:57.