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

Calcolation of spicies diffusivity

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes
  • 1 Post By Zhiheng Wang
  • 1 Post By Zhiheng Wang
  • 2 Post By freuen
  • 1 Post By atulkjoy
  • 4 Post By atulkjoy

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2017, 02:28
Default Calcolation of spicies diffusivity
  #1
Member
 
Zhiheng Wang
Join Date: Mar 2016
Posts: 72
Rep Power: 10
Zhiheng Wang is on a distinguished road
Hi,
I want to calculate the species diffusivity D (fick law) on basis of binary diffusivity I am knowing the formulation ,
My problem is how to extract the data.

As in creatFields.H spicies defined as
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();


every property kappa, mu, alpha,or rho for example is called as composition.rho(i,1e5,T)

How can I implement D (molecular diffusion in same form).

Or if any one suggest how to create PtrList<volScalrField>& D = some variable which can calculate this.
Saeng Kinley likes this.
Zhiheng Wang is offline   Reply With Quote

Old   March 1, 2017, 05:40
Default
  #2
Member
 
Zhiheng Wang
Join Date: Mar 2016
Posts: 72
Rep Power: 10
Zhiheng Wang is on a distinguished road
No body ????
Saeng Kinley likes this.

Last edited by Zhiheng Wang; March 2, 2017 at 00:39. Reason: non
Zhiheng Wang is offline   Reply With Quote

Old   March 11, 2017, 13:32
Default
  #3
New Member
 
Wentao Wang
Join Date: Feb 2014
Posts: 4
Rep Power: 12
freuen is on a distinguished road
For Openfoam 3.0, You can put this code in the createFields.H

PtrList<volScalarField>& Y = composition.Y();
PtrList<volScalarField> Diff;
forAll(Y, i)
{
word name("Diff_" + Y[i].name());
Diff.append(new volScalarField
(
IOobject
(
name,
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(name, dimensionSet(0,2,-1,0,0,0,0), 0)
)
);
fields.add(Diff[i]);
}



Quote:
Originally Posted by Zhiheng Wang View Post
Hi,
I want to calculate the species diffusivity D (fick law) on basis of binary diffusivity I am knowing the formulation ,
My problem is how to extract the data.

As in creatFields.H spicies defined as
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();


every property kappa, mu, alpha,or rho for example is called as composition.rho(i,1e5,T)

How can I implement D (molecular diffusion in same form).

Or if any one suggest how to create PtrList<volScalrField>& D = some variable which can calculate this.
atulkjoy and Kummi like this.
freuen is offline   Reply With Quote

Old   March 14, 2017, 04:42
Default
  #4
Member
 
Atul Kumar
Join Date: Dec 2015
Location: National Centre for Combustion Research and Development
Posts: 48
Rep Power: 10
atulkjoy is on a distinguished road
HI,
Sir Can you answer why line number 174 and 175 are commented in file. These are meant to be up-dation of species diffusivity with sutherland model.

It is about same thing but here the Diffusivity is varing with temperature.

https://github.com/OpenFOAM/OpenFOAM...andTransport.H

175 // Species diffusivity //inline scalar D(const scalar p, const scalar T) const;
Saeng Kinley likes this.
atulkjoy is offline   Reply With Quote

Old   March 14, 2017, 14:46
Default
  #5
New Member
 
Wentao Wang
Join Date: Feb 2014
Posts: 4
Rep Power: 12
freuen is on a distinguished road
I guess it's reserved for future development


Sent from my iPhone using CFD Online Forum mobile app
freuen is offline   Reply With Quote

Old   April 28, 2017, 02:15
Default
  #6
New Member
 
Join Date: Jan 2016
Posts: 15
Rep Power: 10
SH_Zhong is on a distinguished road
Quote:
Originally Posted by freuen View Post
For Openfoam 3.0, You can put this code in the createFields.H

PtrList<volScalarField>& Y = composition.Y();
PtrList<volScalarField> Diff;
forAll(Y, i)
{
word name("Diff_" + Y[i].name());
Diff.append(new volScalarField
(
IOobject
(
name,
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(name, dimensionSet(0,2,-1,0,0,0,0), 0)
)
);
fields.add(Diff[i]);
}
Hi,
I write the code into my creatFields.H,
but I get this error.

'fields' was not declared in this scope.
fields.add(Diff[i]);

So what can I do to get rid of the problems, many thanks in advance!
SH_Zhong is offline   Reply With Quote

Old   May 3, 2017, 01:21
Default
  #7
Member
 
Atul Kumar
Join Date: Dec 2015
Location: National Centre for Combustion Research and Development
Posts: 48
Rep Power: 10
atulkjoy is on a distinguished road
Hi use the code I have sent you you would be able to find Diffusivity. use 2.3.x firefoam as solver. Copy $WM_PROJECT_DIR/fireFoam to $WM_PROJECT_USER_DIR/myfirefoam.
2. Rename createFields.H to old.createFields.H and download createFields.H I sent to you.
3. Add starting lines of sutherland.C to fireFoam.c rename it as MyfireFoam.
4. change make/file, edit this file from fireFoam.C to myFireFoam.C and $FOAM_APPBIN/fireFoam to $FOAM_USER_APPBIN/MyfireFoam.
compile and run the case with declaration of speciesdict file in constantFolder.
Attached Files
File Type: h createFields.H (8.1 KB, 45 views)
File Type: c sutherland.C (5.6 KB, 39 views)
atulkjoy 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
Kinematic Diffusivity - Problem with additional variable clau90 CFX 3 May 14, 2014 09:54
PEM modeling UDS diffusivity in mixture gemini FLUENT 6 August 7, 2012 07:37
What is UDS diffusivity of a self-defined material? aleisia FLUENT 0 March 5, 2011 22:08
Motion diffusivity solver has problems with patches moving toward each other bfa OpenFOAM Running, Solving & CFD 2 July 8, 2009 21:35
Species diffusivity zhou1 FLUENT 0 November 4, 2003 17:23


All times are GMT -4. The time now is 02:16.