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

Multiply U field by a constant

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 18, 2016, 07:51
Question Multiply U field by a constant
  #1
Member
 
Anirudh Kulkarni
Join Date: May 2016
Posts: 62
Rep Power: 9
Tempest is on a distinguished road
Dear Foamers,

I want to multiply vectorField U with a constant value in all cells.

How can I do it?

Should I use,

Code:
forAll(U, celli)
{

U[celli] *= constant;

}
Regards,
Tempest 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
constant velocity and alpha field Maryam1988 Main CFD Forum 0 June 24, 2015 09:53
field functions - table crevoise STAR-CCM+ 3 March 26, 2013 09:37
Field functions and table crevoise Siemens 0 March 20, 2013 10:51
Really big problems when creating own materials da Jop FLUENT 0 June 28, 2007 11:15


All times are GMT -4. The time now is 09:39.