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

how to change scaler fields to vector field

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 3, 2014, 14:18
Default how to change scaler fields to vector field
  #1
Member
 
Ali reza
Join Date: Mar 2014
Posts: 95
Rep Power: 3
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, 16:34
Default
  #2
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: Amherst, MA USA - San Diego, CA USA
Posts: 285
Rep Power: 9
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

Thread Tools
Display Modes

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 On
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
Change in meshing procedure for propeller from 2.2.2 to 2.3.0 pbachant OpenFOAM Native Meshers: snappyHexMesh and Others 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 13:48


All times are GMT -4. The time now is 20:00.