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

how to change scaler fields to vector field

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2014, 15:18
Default how to change scaler fields to vector field
  #1
Senior Member
 
Ali reza
Join Date: Mar 2014
Posts: 110
Rep Power: 12
1988 is on a distinguished road
Dear Foamers
I have defined an equation which was scalar ,but right now I want to change it to vector field,how can i do that?
Code:
fvScalarMatrix CEqn
(
    fvm::ddt(C)
  + fvm::div(phi, C)
 ==
    fvm::laplacian(D,C)
);

CEqn.relax();

CEqn.solve();

//C=min(max(0.0,C),1.0);
1988 is offline   Reply With Quote

Old   October 9, 2014, 17:34
Default
  #2
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18
kmooney is on a distinguished road
Hi Ali,

I think a logical first step here would be to attempt to change the word 'Scalar' to 'Vector' in your declarations.

Quote:
Originally Posted by 1988 View Post
Dear Foamers
I have defined an equation which was scalar ,but right now I want to change it to vector field,how can i do that?
Code:
fvScalarMatrix CEqn
(
    fvm::ddt(C)
  + fvm::div(phi, C)
 ==
    fvm::laplacian(D,C)
);

CEqn.relax();

CEqn.solve();

//C=min(max(0.0,C),1.0);
kmooney 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
SetFields runs with no errors but doesnbt change fields adamsview OpenFOAM Pre-Processing 3 December 12, 2014 22:03
alpha fields in multiphase tutorial cases maybee OpenFOAM Programming & Development 2 March 13, 2014 05:44
[snappyHexMesh] Change in meshing procedure for propeller from 2.2.2 to 2.3.0 pbachant OpenFOAM Meshing & Mesh Conversion 0 February 18, 2014 09:34
multiphaseEulerFoam: efficient way of implementing fields for all phases maybee OpenFOAM Programming & Development 0 January 23, 2014 05:16
Mapping volsurface symmTensor fields after a topological change jcmasters OpenFOAM Bugs 1 September 4, 2007 14:48


All times are GMT -4. The time now is 04:31.