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

Converting scalarField to DimensionedScalarField

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 19, 2014, 13:39
Default Converting scalarField to DimensionedScalarField
  #1
Member
 
Manjunath Reddy
Join Date: Jun 2013
Posts: 37
Rep Power: 4
manju819 is on a distinguished road
Hiiii,

I have scalarField which i want to convert into DimensionedScalarField
Example:
scalarField samples(4);

samples[0] = 0;
samples[1] = 1;
samples[2] = 2;
samples[3] = 3;

I tried so many ways but scalarField is not converting into DimensionedScalarField

please help me how to do

Thanking you,

Regards
Manjunath
manju819 is offline   Reply With Quote

Old   March 20, 2014, 22:02
Default Scalar to DimensionedScalar
  #2
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AU
Posts: 123
Rep Power: 5
ahmmedshakil is on a distinguished road
You can try with the following way:
Code:
dimensionedScalar kT1
            (
                "kT1",
                dimensionSet(1, 1, -3, -1, 0, 0, 0),
                scalar(15)
            );
Cheers,
#shakil

Quote:
Originally Posted by manju819 View Post
Hiiii,

I have scalarField which i want to convert into DimensionedScalarField
Example:
scalarField samples(4);

samples[0] = 0;
samples[1] = 1;
samples[2] = 2;
samples[3] = 3;

I tried so many ways but scalarField is not converting into DimensionedScalarField

please help me how to do

Thanking you,

Regards
Manjunath
ahmmedshakil is offline   Reply With Quote

Old   March 21, 2014, 03:04
Default Hiii shakil
  #3
Member
 
Manjunath Reddy
Join Date: Jun 2013
Posts: 37
Rep Power: 4
manju819 is on a distinguished road
Thank you for your reply,


It is converting scalar 15 into dimensioned scalar not the field.


Regards
N.Manjunath
manju819 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
Add a scalarField type to the templated DataEntry class carowjp OpenFOAM Programming & Development 1 March 20, 2014 06:20
OpenFOAM 1.7.1 and gcc 4.6.3: scalarField no bounds check? adhiraj OpenFOAM 1 May 26, 2012 09:20
Append scalar to scalarField Hisham OpenFOAM Programming & Development 12 October 28, 2011 19:42
Creating a symmTensorField from a scalarField maninthemail OpenFOAM 2 September 30, 2011 04:13
boundary condition scalarField in parallel ubald OpenFOAM 4 November 5, 2010 20:26


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