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

to obtain a new variable value in each cell

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 1, 2015, 09:03
Default to obtain a new variable value in each cell
  #1
New Member
 
ARUN
Join Date: Jan 2015
Location: Kerala
Posts: 18
Rep Power: 2
ARUN K RAJ is on a distinguished road
Hi Members

I want to obtain the mass transfer in each cell of my mesh. I have added the necessary equations. I have included a no_read, auto_write command in createField.H,bt it seems that it writes only a single value for the entire time per run. hw do i calculate the mdot for each cell???? is there any changes to be made in the runtime loop of solver.C file too?
And also is there any way to change volScalarField to dimensionedScalarField?
ARUN K RAJ is offline   Reply With Quote

Old   March 1, 2015, 10:13
Post
  #2
Member
 
alireza
Join Date: Feb 2015
Posts: 57
Rep Power: 2
rapierrz is on a distinguished road
Hi arun. D is a scalar and change in each cell per time


volScalarField D
(
IOobject
(
"D",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("D",dimensionSet(0,2,-1,0,0,0,0), scalar(0.0))
);
rapierrz is offline   Reply With Quote

Old   March 1, 2015, 11:46
Unhappy
  #3
New Member
 
ARUN
Join Date: Jan 2015
Location: Kerala
Posts: 18
Rep Power: 2
ARUN K RAJ is on a distinguished road
Hi Alireza,

I have done a similar thing as you told

-->
volScalarField massflow
(
IOobject
(
"massflow",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("massflow", dimensionSet(1, -1.25, 0.5, 0, 0), scalar(0.0))
);

but the problem is it shows the value zero in the write files in each time intervals
do we have to change smthng else too. I have seperately named a header file containing masstransfer containing the equation for mass flow. still i get all values as zero
ARUN K RAJ 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
Cell Reynolds Number laliong Main CFD Forum 11 March 19, 2015 12:42
I know the cell ID, how do I find the cell coordinates? simpomann OpenFOAM Programming & Development 6 June 30, 2014 10:29
Solution Diverging with Trimmer Mesh rietuk STAR-CCM+ 8 February 27, 2013 05:50
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15
Defining and assigning a variable to a cell Robi FLUENT 0 July 13, 2005 18:27


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