|
[Sponsors] |
January 6, 2017, 03:28 |
Calcolation of spicies diffusivity
|
#1 |
Member
Zhiheng Wang
Join Date: Mar 2016
Posts: 72
Rep Power: 10 |
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. |
|
March 1, 2017, 06:40 |
|
#2 |
Member
Zhiheng Wang
Join Date: Mar 2016
Posts: 72
Rep Power: 10 |
No body ????
Last edited by Zhiheng Wang; March 2, 2017 at 01:39. Reason: non |
|
March 11, 2017, 14:32 |
|
#3 | |
New Member
Wentao Wang
Join Date: Feb 2014
Posts: 4
Rep Power: 12 |
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:
|
||
March 14, 2017, 05:42 |
|
#4 |
Member
Atul Kumar
Join Date: Dec 2015
Location: National Centre for Combustion Research and Development
Posts: 48
Rep Power: 11 |
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; |
|
March 14, 2017, 15:46 |
|
#5 |
New Member
Wentao Wang
Join Date: Feb 2014
Posts: 4
Rep Power: 12 |
||
April 28, 2017, 03:15 |
|
#6 | |
New Member
Join Date: Jan 2016
Posts: 15
Rep Power: 10 |
Quote:
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! |
||
May 3, 2017, 02:21 |
|
#7 |
Member
Atul Kumar
Join Date: Dec 2015
Location: National Centre for Combustion Research and Development
Posts: 48
Rep Power: 11 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kinematic Diffusivity - Problem with additional variable | clau90 | CFX | 3 | May 14, 2014 10:54 |
PEM modeling UDS diffusivity in mixture | gemini | FLUENT | 6 | August 7, 2012 08:37 |
What is UDS diffusivity of a self-defined material? | aleisia | FLUENT | 0 | March 5, 2011 23:08 |
Motion diffusivity solver has problems with patches moving toward each other | bfa | OpenFOAM Running, Solving & CFD | 2 | July 8, 2009 22:35 |
Species diffusivity | zhou1 | FLUENT | 0 | November 4, 2003 18:23 |