CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

writing volScalarField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 16, 2010, 13:55
Default writing volScalarField
  #1
New Member
 
Nadeem
Join Date: Mar 2009
Location: München, Bavarian, Deutschland
Posts: 24
Rep Power: 17
ubaid is on a distinguished road
Hello everybody,

I am stucked to a simple problem and not able to find out a solution of it.

I want to read gradient from another file and interested to write it into T (temperature file of OpenFOAM).

I did like as below:

volScalarfield field
(
IOobject(fieldName,runtTime.timeName(),mesh,IOobje ct::NO_READ,IOobject::AUTO_WRITE),
mesh,
dimensionedScalar(fieldName,dimTemperature, 200),
"fixedGradient"
);
forAll(field.BoundaryField(),patchID)
{
field.boundaryField()[patchID]==30;
}

As an output of this code am getting something different.
that is.

boundaryField
{
Inlet
{
type fixedGradient;
gradient uniform 0;
}

and so on;
}

but I am interested to get output as below:

boundaryField
{
inlet
{
type fixedGradient;
gradient uniform 30;

}
}

I am sure am doing a mistake, and I think by using field.boundaryField()[patchID]==30; temperature at the patchID is getting stored, instead of temperature value, am interested to store gradient value.

I shall be thankful for your kind replies.

BEst Regards,
ubaid is offline   Reply With Quote

Reply

Tags
field, fixedgradient, patchfield, volscalarfield


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
if-loop, volScalarField comparison volker OpenFOAM 7 March 6, 2020 20:03
Problems with creating a volScalarField georlade OpenFOAM Programming & Development 4 December 4, 2016 12:31
An error has occurred when Writing backup file tian CFX 0 June 28, 2007 21:29
journal file command for writing mass flow rate James FLUENT 0 July 26, 2006 10:51
Fatal error error writing to tmp No space left on device maka OpenFOAM Installation 2 April 3, 2006 08:48


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