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

How does one convert a scalarField into a volScalarField

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 3, 2008, 06:59
Default Hi Su, well i have cyclic con
  #21
Member
 
davey david
Join Date: Mar 2009
Posts: 54
Rep Power: 17
suredross is on a distinguished road
Hi Su,
well i have cyclic conditions for the inlet/outlet,symmetry plane bottom and three electrode patches with psi = 1/-1,alternating and fixed walls having a zero gradient.

how do i get to compile the code to suit my case?do i simply omit the temporal terms?

thanks in advance

davey
suredross is offline   Reply With Quote

Old   June 3, 2008, 21:44
Default Hi davey you got a uniform
  #22
Senior Member
 
su_junwei's Avatar
 
su junwei
Join Date: Mar 2009
Location: Xi'an China
Posts: 151
Rep Power: 20
su_junwei is on a distinguished road
Send a message via MSN to su_junwei
Hi davey
you got a uniform field with laplaceFoam solver?
Su Junwei
su_junwei is offline   Reply With Quote

Old   June 5, 2008, 06:26
Default Hi Su, yes,i do have a unifor
  #23
Member
 
davey david
Join Date: Mar 2009
Posts: 54
Rep Power: 17
suredross is on a distinguished road
Hi Su,
yes,i do have a uniform field but i used the icofoam solver and commented out all the pressure and velocity terms ,whiles adding my laplace equation to it.seems to be working fine.will keep you posted on any mishaps which might crop up.

thanks
davey
suredross is offline   Reply With Quote

Old   August 4, 2016, 10:43
Default
  #24
New Member
 
elham usefi
Join Date: Apr 2016
Location: tabriz,iran
Posts: 13
Rep Power: 10
elham usefi is on a distinguished road
Quote:
Originally Posted by su_junwei View Post
Hi Heng

It doesn't seem that ScalarField can write itself into a file.

To make a object auto writing, one have to register it using regIOobject.

try dimensionedField or use the internalField() of volScalarField

volScalarField temp
(
IOobject
(
"temp",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh
dimensionedScalar("zero", dimensionSet(0,0,0,0,0,0,0), 0.0),
zeroGradientFvPatchField<scalar>::typeName
)

scalarField &sf=temp.internalField();
sf=....

Su Junwei

Hi su_junwei
I have a question! what does exactly the last zero in
dimensionedScalar("zero", dimensionSet(0,0,0,0,0,0,0), 0.0),
refers to?
elham usefi 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
How to sum up scalarField wese OpenFOAM Running, Solving & CFD 2 August 19, 2019 18:30
How to set up an AUTO_WRITE scalarField xiao OpenFOAM Running, Solving & CFD 9 July 22, 2010 04:23
max for scalarField maka OpenFOAM Bugs 9 February 19, 2009 10:43
ScalarField division maka OpenFOAM Pre-Processing 2 August 27, 2007 06:10
[CGNS] Computing a cellcentered scalarField from a vertexcentered scalarField mbeaudoin OpenFOAM Meshing & Mesh Conversion 10 February 22, 2007 08:43


All times are GMT -4. The time now is 15:33.