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

[Other] Multi species mass transport library [update]

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

Like Tree38Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 21, 2015, 17:43
Default
  #81
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by Alish1984 View Post
Dear Bruno and Athanassios
Do you have any comment about my post regarding source terms in energy equation?
Regards, Ali
Quick answer: Sorry, but I'm not familiar enough with this code and its contents are beyond my level of expertise.
wyldckat is offline   Reply With Quote

Old   August 26, 2015, 10:47
Default
  #82
New Member
 
Join Date: Apr 2015
Posts: 25
Rep Power: 11
khalifa is on a distinguished road
Hello People,

I am trying to compile the diffusivityModels library(code version of 2.1.x ) and I am getting this error

In file included from diffusivityModel/diffusivityModel.C:27:0:
diffusivityModel/diffusivityModel.H:40:25: fatal error: porousZones.H: No such file or directory
compilation terminated.
make: *** [Make/linuxGccDPOpt/diffusivityModel.o] Error 1


from where shall I bring this file porousZones.H ?

Thanks
Ali
atulkjoy likes this.
khalifa is offline   Reply With Quote

Old   August 26, 2015, 14:46
Default
  #83
New Member
 
Join Date: Apr 2015
Posts: 25
Rep Power: 11
khalifa is on a distinguished road
Quote:
Originally Posted by Athanassios View Post
Hello guys,

I found out that for some reason entries in the files thermo.compressibleGas that you can find in both of our testcases for the original and modified MultispeciesMassTransportLibrary got messed up. Please check that files in my previous uploaded file (last post) or just download the corrected testcases for 2.1.x and 2.3.x (attached).

Thanks!
Thank you for your efforts. for version 2.3.x, I successfully compiled the libraries, however, when compiling the solver modifiedreactingFoam , this error shows up :

fatal error: multiSpeciesTransportModel.H: No such file or directory

any suggestions ?

thank you
Ali

Last edited by khalifa; September 1, 2015 at 14:37.
khalifa is offline   Reply With Quote

Old   September 10, 2015, 19:27
Default
  #84
New Member
 
Join Date: Apr 2015
Posts: 25
Rep Power: 11
khalifa is on a distinguished road
Dear Foamers, Thank you so much for your contributions in producing these libraries and developing them to be working with openFoam 2.3.1.

I am trying now to add dynamicMeshing feature to the solver , to combine between multispecies transport and dynamic meshing in one solver.

I have a version of reactingFoam with dynamic meshing edits and it works, and I tried to copy the the codes I found related to dynamic meshing to the modifiedReactingFoam solver and compiled successfully, yet no dynamic mesh is created even though the iteration goes on without errors and the criteria for dynamic meshing was achieved!

I am attaching the solver which have the dynamic meshing working , and I wish if someone can help to combine it with the modifiedReactingFoam !

regards
Attached Files
File Type: zip reactingFoam1.zip (13.7 KB, 94 views)
khalifa is offline   Reply With Quote

Old   October 13, 2015, 12:37
Default
  #85
New Member
 
Join Date: Apr 2015
Posts: 25
Rep Power: 11
khalifa is on a distinguished road
Quote:
Originally Posted by Alish1984 View Post
Dear Athanassios

I've seen another strange formulation in both 1.7.x and 2.3.x versions. Maybe I'm wrong and I would be very happy if you correct me.

In version 2.3 in multiSpeciesTransportModel.C in updateMolarFractions() function.

To update molar fractions you've used the below formulation:

xCells[cellI] = yCells[cellI] * psiCells[cellI] * TCells[cellI]
* R / W(i);
(I)

In my opinion it has a problem. since
psi=1/(Ri*T) Ri is gas constant for specie i
Ri=Ru/Wi Ru is universal gas const.
and Wi is molecular weight of specie i
here in your formulation R is universal gas const. namely Ru.
So in your formulation we have:
xi=yi*1/(Ri*T)*T*Ru/Wi=yi*Ru/(Ri*Wi)=yi*Wi/Wi=yi !!! here xi and yi refer to molar and mass fraction of specie i in a cell

It seems to me that this is a bug the eq. (I) should be:

xCells[cellI] = yCells[cellI] * Wmix / W(i); with Wmix is mixture molecular weight
we can use
1/Wmix[cellI]=sum(yi/Wi)

Is this really a bug or I've made a mistake?
Regards,
Ali
Dear Ali ,

any news regarding this or the energy equation ?

I have tested the solver for 2.3.1 and I would say there is clearly a problem related with the energy equation.

did you conclude to any fixes or so ?

Thanks
khalifa is offline   Reply With Quote

Old   February 19, 2016, 03:19
Default
  #86
Member
 
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 11
wayne14 is on a distinguished road
Anyone know if this multi species transport library has any update? Or anyone has done some work based on it?

Thanks,
Yan
wayne14 is offline   Reply With Quote

Old   May 15, 2016, 14:48
Default
  #87
New Member
 
Alan Wang
Join Date: Feb 2016
Location: Tempe, Az
Posts: 4
Rep Power: 10
freuenwwt is on a distinguished road
Send a message via MSN to freuenwwt
I think the molar fraction update is no problem.

psi = rho/P; not "psi=1/(Ri*T) Ri " is gas constant for specie i

based on the code of psiThermo.C

93 Foam::tmp<Foam::volScalarField> Foam:siThermo::rho() const
94 {
95 return p_*psi_;
96 }

The energy equation has some problem because of Enthalpy Diffusion. We need to include the Enthalpy Diffusion term in the equation. If we change all the species Cp are the same. The temperature solution would be OK.

The energy equation should be:

fvScalarMatrix EEqn
(
fvm::ddt(rho, e) + fvm::div(phi, e)
+ fvc::ddt(rho, K) + fvc::div(phi, K)
+ fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U), p, ”div(phiv,p)”)
- fvm::laplacian(turbulence->alphaEff(), e) +sum[fvm::laplacian(hj*Di,m, Yi)]
==
fvOptions(rho, e)
);

hj is the specific heat of ith species. I don't how to implement the term into the energy equation: sum[fvm::laplacian(hj*Di,m, Yi)]

If someone know how to do it please let us know.
Zhiheng Wang likes this.
freuenwwt is offline   Reply With Quote

Old   June 21, 2016, 06:05
Default diffusion flux calculation
  #88
New Member
 
Wang Wei
Join Date: Apr 2016
Posts: 11
Rep Power: 10
Wang Wei is on a distinguished road
Hi, I have a question about mass diffusion flux per specie Ji.

I found the code in multiSpeciesTransportModel.C
Code:
Foam::surfaceScalarField Foam::multiSpeciesTransportModel::j
(
    const Foam::label i
)
{
    return n(i) -
        fvc::interpolate(thermo_.composition().Y(i)) * turbulence_.phi();
}
and Fick.C
Code:
ni = yEqn().flux();
If I use this line to calculate the mass diffusion flux per specie
Code:
J[i]=fvc::interpolate(-rho*Dim[i])*(fvc::interpolate(fvc::grad(Yi)) & mesh.Sf());
are this two methods equivalent?
Zhiheng Wang likes this.
Wang Wei is offline   Reply With Quote

Old   June 21, 2016, 07:10
Default
  #89
New Member
 
Wang Wei
Join Date: Apr 2016
Posts: 11
Rep Power: 10
Wang Wei is on a distinguished road
Quote:
Originally Posted by freuenwwt View Post
I think the molar fraction update is no problem.

psi = rho/P; not "psi=1/(Ri*T) Ri " is gas constant for specie i

based on the code of psiThermo.C

93 Foam::tmp<Foam::volScalarField> Foam:siThermo::rho() const
94 {
95 return p_*psi_;
96 }

The energy equation has some problem because of Enthalpy Diffusion. We need to include the Enthalpy Diffusion term in the equation. If we change all the species Cp are the same. The temperature solution would be OK.

The energy equation should be:

fvScalarMatrix EEqn
(
fvm::ddt(rho, e) + fvm::div(phi, e)
+ fvc::ddt(rho, K) + fvc::div(phi, K)
+ fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U), p, ”div(phiv,p)”)
- fvm::laplacian(turbulence->alphaEff(), e) +sum[fvm::laplacian(hj*Di,m, Yi)]
==
fvOptions(rho, e)
);

hj is the specific heat of ith species. I don't how to implement the term into the energy equation: sum[fvm::laplacian(hj*Di,m, Yi)]

If someone know how to do it please let us know.
Hi, Alan! you can use a loop like this
Code:
forAll(Y,i)
{
EEqn+=fvm::laplacian(hj*Dim,Y[i]);
}
By the way, how do you get the hj?
Zhiheng Wang likes this.
Wang Wei is offline   Reply With Quote

Old   June 21, 2016, 07:16
Default
  #90
New Member
 
Wang Wei
Join Date: Apr 2016
Posts: 11
Rep Power: 10
Wang Wei is on a distinguished road
Quote:
Originally Posted by wayne14 View Post
Anyone know if this multi species transport library has any update? Or anyone has done some work based on it?

Thanks,
Yan
Hi, Wang Yan, I am using version3.0 openfoam, and I am working on modifing the existing reactingFoam with adding mass diffusion model. It is hard for me to update the library.
Wang Wei is offline   Reply With Quote

Old   June 21, 2016, 11:42
Default
  #91
New Member
 
Alan Wang
Join Date: Feb 2016
Location: Tempe, Az
Posts: 4
Rep Power: 10
freuenwwt is on a distinguished road
Send a message via MSN to freuenwwt
Hi Wang Wei,

For Hj calcualtion, you can use the function in basicSpecieMixture.H:
scalar Hs
(
const label speciei,
const scalar p,
const scalar T
) const = 0;
Zhiheng Wang likes this.
freuenwwt is offline   Reply With Quote

Old   June 21, 2016, 12:36
Default
  #92
New Member
 
Wang Wei
Join Date: Apr 2016
Posts: 11
Rep Power: 10
Wang Wei is on a distinguished road
Alan, thank you for your reply. I am working on hydrogen /air combustion simulation inside a tube. Since I use version3.0 openfoam, I can't use the library post here. So I added some codes into reactingFoam solver referring to Champan-Enskog model and Fick's model. But temperature is always out of range during calculation. Which mass transport model do you use and do you have similar problem?
Wang Wei is offline   Reply With Quote

Old   August 30, 2016, 18:59
Default
  #93
New Member
 
David Sommer
Join Date: Mar 2015
Posts: 2
Rep Power: 0
demsomme is on a distinguished road
Quote:
Originally Posted by Wang Wei View Post
Alan, thank you for your reply. I am working on hydrogen /air combustion simulation inside a tube. Since I use version3.0 openfoam, I can't use the library post here. So I added some codes into reactingFoam solver referring to Champan-Enskog model and Fick's model. But temperature is always out of range during calculation. Which mass transport model do you use and do you have similar problem?
Hi Wang Wei (and any others still working on diffusion modelling),

I'm working on a very similar application looking at high temperature reforming and combustion. I am working to implement a Fickian model and a Stefan-Maxwell diffusion model that can be used with reactingFoam and/or reactingParcelFoam. I'm using Novaresio et al.'s library, with the updates from this forum, as a starting point.

I am also encountering temperature issues. I find that even if remove the MSTM source terms from the heat equation that I still get extremely high temperature fluctuations even in an 'isothermal' simulation. I'm working on creating a simple "Stefan Tube" test case and associated boundary conditions to give an easy, analytically tractable, case for debugging and validation.

Feel free to private message me if you would like to collaborate on this, or I will post my progress here if I start to figure out the issues.

Thanks,
- Dave
demsomme is offline   Reply With Quote

Old   October 3, 2016, 14:10
Default
  #94
Member
 
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11
sahmed is on a distinguished road
Quote:
Originally Posted by Athanassios View Post
Hi peeps,

as promissed, with this post, I'm uploading the modified MultispeciesMassTransport library now for OpenFOAM 2.3.x, ready to use (file attached). A smoothly running testcase has been included. The same testcase for 2.1.x has also been included for comparisons.
Hi Athanassois
First of all, thanks for your work and contributing the community. I am trying to use reactingFoam to simulate one of my combustion models using OF 2.3.1. I think the test case that you provided with the multidimensional mass transport library should work excellent for my case.
Since I am a new one in this business (but learning quickly ) I need your help here. I downloaded the zip that you provided. Could you tell me how can I install that new modifiedReactingFoam version with the multi library in my existing OF.
The question might be silly, but please explain me in brief the procedures.
Thanks a lot in advance.
sahmed is offline   Reply With Quote

Old   October 4, 2016, 11:23
Default Any update
  #95
Member
 
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11
sahmed is on a distinguished road
Quote:
Originally Posted by freuenwwt View Post
The energy equation has some problem because of Enthalpy Diffusion. We need to include the Enthalpy Diffusion term in the equation. If we change all the species Cp are the same. The temperature solution would be OK.

The energy equation should be:

fvScalarMatrix EEqn
(
fvm::ddt(rho, e) + fvm::div(phi, e)
+ fvc::ddt(rho, K) + fvc::div(phi, K)
+ fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U), p, ”div(phiv,p)”)
- fvm::laplacian(turbulence->alphaEff(), e) +sum[fvm::laplacian(hj*Di,m, Yi)]
==
fvOptions(rho, e)
);

hj is the specific heat of ith species. I don't how to implement the term into the energy equation: sum[fvm::laplacian(hj*Di,m, Yi)]

If someone know how to do it please let us know.
Hi Alan
Could you (or anyone) solve the energy equation problem in the library for OF version 2.3.x? Could you please share that if you are done. It would be very much helpful for the community.
Zhiheng Wang likes this.
sahmed is offline   Reply With Quote

Old   October 5, 2016, 01:47
Default Help needed to install the multicomponent library
  #96
Member
 
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11
sahmed is on a distinguished road
Quote:
Originally Posted by khalifa View Post
Thank you for your efforts. for version 2.3.x, I successfully compiled the libraries
Hi Ali
I tried to link the multispeciesTransport library for OF 2.3.1 and ran the ./install in that zip file. Everything looks fine but I guess my library is not linked to the solver. I checked that by removing the transportProperties file from the constant folder and still the simulation runs. I also added the libs (libdiffusivityModels.so libmultispeciesTransportModels.so) in the system/controlDict.
I am really confused where I messed up.
Could you PLEASE help me solving it.

Thanks in advance
sahmed is offline   Reply With Quote

Old   October 13, 2016, 23:46
Default
  #97
New Member
 
Yang Dali
Join Date: Sep 2016
Posts: 1
Rep Power: 0
yangdali09 is on a distinguished road
Dear Valerio,
I canot open the pdf file after downloaded , could you send me a copy please, many thanks!
my email is 18628197569@163.com
yangdali09 is offline   Reply With Quote

Old   December 5, 2016, 13:05
Default Help requested
  #98
Member
 
Sheikh Ahmed
Join Date: Dec 2015
Location: South Carolina, USA
Posts: 88
Rep Power: 11
sahmed is on a distinguished road
Quote:
Originally Posted by demsomme View Post
Hi Wang Wei (and any others still working on diffusion modelling),

I'm working on a very similar application looking at high temperature reforming and combustion. I am working to implement a Fickian model and a Stefan-Maxwell diffusion model that can be used with reactingFoam and/or reactingParcelFoam. I'm using Novaresio et al.'s library, with the updates from this forum, as a starting point.

I am also encountering temperature issues. I find that even if remove the MSTM source terms from the heat equation that I still get extremely high temperature fluctuations even in an 'isothermal' simulation. I'm working on creating a simple "Stefan Tube" test case and associated boundary conditions to give an easy, analytically tractable, case for debugging and validation.

Feel free to private message me if you would like to collaborate on this, or I will post my progress here if I start to figure out the issues.

Thanks,
- Dave
Hi Dave
I was wondering if you are still in touch of the multicomponent transport. I am trying to implement not a multicomponent, but a simpler 'mixture averaged' type of transport formulation. If you could successfully implement the MULT library in your work, I expect your kind help to give me some idea. I know there are some inherent flaws in the library.
Please let me know. Thanks

~Sheikh Ahmed
sahmed is offline   Reply With Quote

Old   March 25, 2017, 13:04
Default high-temperature-problem
  #99
New Member
 
Cloudy
Join Date: Dec 2016
Posts: 2
Rep Power: 0
flyingmercury is on a distinguished road
Hi Dave,

Have you addressed this ''incorrectly high temperature" issue? I have also found this problem is not caused by the energy equation. If you already fixed this bug, please post here.

Regards,
Xin


Quote:
Originally Posted by demsomme View Post
Hi Wang Wei (and any others still working on diffusion modelling),

I'm working on a very similar application looking at high temperature reforming and combustion. I am working to implement a Fickian model and a Stefan-Maxwell diffusion model that can be used with reactingFoam and/or reactingParcelFoam. I'm using Novaresio et al.'s library, with the updates from this forum, as a starting point.

I am also encountering temperature issues. I find that even if remove the MSTM source terms from the heat equation that I still get extremely high temperature fluctuations even in an 'isothermal' simulation. I'm working on creating a simple "Stefan Tube" test case and associated boundary conditions to give an easy, analytically tractable, case for debugging and validation.

Feel free to private message me if you would like to collaborate on this, or I will post my progress here if I start to figure out the issues.

Thanks,
- Dave
flyingmercury is offline   Reply With Quote

Old   December 20, 2017, 16:53
Default high-temperature-problem
  #100
Member
 
Reza khodadadi
Join Date: Apr 2011
Location: https://t.me/pump_upp
Posts: 32
Rep Power: 15
reza_65 is on a distinguished road
Send a message via ICQ to reza_65 Send a message via AIM to reza_65 Send a message via Yahoo to reza_65
Quote:
Originally Posted by flyingmercury View Post
Hi Dave,

Have you addressed this ''incorrectly high temperature" issue? I have also found this problem is not caused by the energy equation. If you already fixed this bug, please post here.

Regards,
Xin

I tried this solver, and as the other fellows mentioned, it shows extremely high temperature which is completely wrong and even it goes out of janaf! I tried another transport models, but still there is this problem. Even with different reaction mechanism still there is high temp problem.
So, I think the problem is coming from coupling energy equation with Yequation.
fatemeh chitgarha likes this.
reza_65 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Species Mole and Mass Fraction Macro combustion FLUENT 18 February 5, 2024 13:23
UDS and fluent internal species transport model jinsong FLUENT 0 May 3, 2018 12:37
Inconsistencies in reading .dat file during run time in new injection model Scram_1 OpenFOAM 0 March 23, 2018 23:29
Surface instabilities with 2-phase species transport richard222 Fluent Multiphase 0 May 4, 2016 05:06
Questions for a species transport problems (snapshots attached) aleisia FLUENT 2 October 9, 2011 05:40


All times are GMT -4. The time now is 08:21.