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

swirlinjector

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

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 16, 2009, 06:53
Default
  #21
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
Quote:
Originally Posted by az1362f View Post
hi

I solve my last problem but still I don't know how can I describe chamber gas?

for example for a chamber full of N2 as gas instead of air.
In the 0-directory you have the N2 and O2 files that contain the mass-fraction information for these species.
If you check them you will see that in the N2-file you have a line that reads like this -
internalField uniform 0.766;

and in the O2-file you have a line that reads like this -
internalField uniform 0.233;

These two species form 'air'.
I will leave it up to you to figure out how to modify it so you only have N2.
niklas is offline   Reply With Quote

Old   June 16, 2009, 16:20
Default initial condition
  #22
Member
 
amin
Join Date: May 2009
Posts: 62
Rep Power: 16
az1362f is on a distinguished road
Hi

I know that these (N2 & O2 files in 0 directory) are initial condition for chamber gas.I am not sure about it when I change them to for example N2=1.0 and O2=0.0,is it like that chamber gas is only N2 in all of time steps?
But in thermophysicalProperties file I introduce chemkin file that include species like O2 N2 Co2 H2o,doesn't dieselfoam use these species as chamber gas for next time steps?
which part of code call for gas properties or where can I see gas properties in Src?

I change N2 to 1.0 and O2 to 0.0 but my result did n't effect any more(SMD & liquidpenetration).also I changed N2 to 1.0 and O2 to 1.0 but dieselfoam did not generate an error,How is it?
what is the role of inertSpecie in thermophysicalProperties file ?

Please guid me to select N2 just as a chamber gas.

thanks
regard
az1362f is offline   Reply With Quote

Old   June 17, 2009, 03:04
Default
  #23
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
Quote:
Originally Posted by az1362f View Post
I know that these (N2 & O2 files in 0 directory) are initial condition for chamber gas.I am not sure about it when I change them to for example N2=1.0 and O2=0.0,is it like that chamber gas is only N2 in all of time steps?
No. It is only the initial conditions.
You have to specify boundary conditions and initial conditions for every specie
that you define in chem.inp, but to make life easier there is a file called Ydefault.
Lets say you have NO2, NO, CO, OH defined in the chem.inp.
Normally you would set the initial massfraction to zero for these, but if you have alot of species its quite exhausting just setting everything to zero, thats
where the Ydefault file comes in.
So if you havent got a file for NO2, NO, CO or OH the solver will look for a file called Ydefault and use the intial conditions and boundary conditions from that file.
Take a look in the file
src/thermophysicalModels/combustion/mixtureThermos/mixtures/combustionMixture/combustionMixture.C
if you want to see how it is done.

Quote:
Originally Posted by az1362f View Post
But in thermophysicalProperties file I introduce chemkin file that include species like O2 N2 Co2 H2o,doesn't dieselfoam use these species as chamber gas for next time steps?
which part of code call for gas properties or where can I see gas properties in Src?
the properties are defined in therm.dat.
all the species will have the laminar viscosity-coefficients hardcoded for the sutherland expression to 1.67212e-6 and 170.672
this is done in
src/thermophysicalModels/combustion/chemistryReaders/chemkinReader/chemkinLexer.L
You can look here for more info on format
http://openfoamwiki.net/index.php/Contrib_dieselFoam
Quote:
Originally Posted by az1362f View Post
I change N2 to 1.0 and O2 to 0.0 but my result did n't effect any more(SMD & liquidpenetration).also I changed N2 to 1.0 and O2 to 1.0 but dieselfoam did not generate an error,How is it?
I fail to see why changing the gas to just N2 would affect these parameters.
Usually you use N2 in experiments to avoid combustion, but in the CFD world you can just set the chemistry to off in chemistryProperties to turn off all the reactions.
When the massfractions are read everything will be normalized to 1. Just run a few timesteps and check the values and you will see that they will have changed to 0.5.

Quote:
Originally Posted by az1362f View Post
what is the role of inertSpecie in thermophysicalProperties file ?
since the massfractions have to always add up to 1 you dont have to solve the transport equations for all the species,
the inertSpecie will instead be calculated as 1- sum(Yi)
check the file
applications/solvers/combustion/dieselEngineFoam/YEqn.H
banji likes this.
niklas is offline   Reply With Quote

Old   June 18, 2009, 01:55
Default diesel Fuel
  #24
Member
 
amin
Join Date: May 2009
Posts: 62
Rep Power: 16
az1362f is on a distinguished road
Hi

thank you very much for your complete answers dear Dr Nordin.

I found that fuel properties that I want to use are close to diesel fuel.does openfoam has properties of these fuel?
I check in SRC and found C12H26,is this fuel used as diesel fuel in common?
I now that C12H26 is one of the component of diesel fuel. is it correct to use it as diesel fuel?

I used C12H26 in thermophysical properties file and chemkin file as second fuel But when I ran diesel fuel I face an error, I check therm.dat file in chemkin directory of case but I didn't find C12H26 coefficient in this file,I am sure that this error is related to this file.
then how can i find these coefficient?
Do you have these coefficient.I will be thankful if you send them for me.

Thanks
regard
az1362f is offline   Reply With Quote

Old   June 22, 2009, 06:07
Default
  #25
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
http://garfield.chem.elte.hu/Burcat/burcat.html
niklas is offline   Reply With Quote

Old   June 22, 2009, 21:25
Smile nasa polynomial
  #26
Member
 
amin
Join Date: May 2009
Posts: 62
Rep Power: 16
az1362f is on a distinguished road
Hi Dear Dr Nordin;

I am thankful for your kindly help.I am so glad that have a friend like you.

I also found a pdf like this:

http://www.docstoc.com/docs/4201307/...ondensed-Phase

Thanks
Regard
az1362f is offline   Reply With Quote

Old   June 22, 2009, 21:29
Question Kiva Or openFoam
  #27
Member
 
amin
Join Date: May 2009
Posts: 62
Rep Power: 16
az1362f is on a distinguished road
Hi Dear Dr Nordin;

I know that you work with both KIva and openFoam code,I have a question:

Which of them are really suitable for simulating spray simulation?
az1362f is offline   Reply With Quote

Old   June 23, 2009, 02:00
Default
  #28
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
Quote:
Originally Posted by az1362f View Post
Hi Dear Dr Nordin;

I know that you work with both KIva and openFoam code,I have a question:

Which of them are really suitable for simulating spray simulation?
both,
but if you are planning to alter/add something on your own
I know which one I would pick.
niklas is offline   Reply With Quote

Old   June 23, 2009, 04:31
Question kiva or openfoam
  #29
Member
 
amin
Join Date: May 2009
Posts: 62
Rep Power: 16
az1362f is on a distinguished road
Hi Dear Dr Nordin;

first by following my last question I am planning to alter/add something on my own,which one I would pick?

second I copy new therm.dat file that you putted for me,but I face this error :




| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Exec : dieselFoam
Date : Jun 23 2009
Time : 22:35:57
Host : spray
PID : 8865
Case : /home/openfoam1.5/OpenFOAM/openfoam1.5-1.5/run/tutorials/dieselFoam/aachenBomb
nProcs : 1

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


Reading thermophysicalProperties
Selecting thermodynamics package hMixtureThermo<reactingMixture>
Selecting chemistryReader chemkinReader


C12H26 not found in table. Valid entries are
820
(
CH3CHCL
CL2SISICL
CH3CHCH
SIF2N
A2C2H>2
CH3OCL
CH2CCLOH
.
.
.
.
.
CCL2CCLO
H2SINH3
KO2<S>
A1C2H3*
A1C2H>2
CLCH2OH
H2SISIH2
CCL3CCLO
H3SICH2
H3SICH3
)

in which table I would define C12H26?

thanks
regard
az1362f is offline   Reply With Quote

Old   June 23, 2009, 04:55
Default
  #30
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
Its clearly telling you that it cannot find C12H26 in therm.dat
thats because in Burcat's file the name is N-DODECANE
Code:
C12H26            T 5/99C  12H  26    0    0G   200.000  6000.000  1000.000    1
3.70187925E+01  5.54721488E-02-1.92079548E-05 3.08175574E-09-1.84800617E-13    2
-5.26984458E+04-1.61453501E+02 2.13264480E+01-3.86394002E-02 3.99476113E-04    3
-5.06681097E-07 2.00697878E-10-4.22475053E+04-4.85848300E+01-3.49836226E+04    4
...and I would of course use openfoam.
banji and Mahmoud_aboukhedr like this.
niklas is offline   Reply With Quote

Old   June 23, 2009, 10:35
Default saving liquid spray penetration
  #31
JMP
New Member
 
José M. Pastor
Join Date: May 2009
Location: Valencia (Spain)
Posts: 3
Rep Power: 16
JMP is on a distinguished road
Hi,

I'm a begginer into OpenFoam and C++. Maybe this is an obvious question.
In order to write liquid penetration, did you include those lines into dieselFoam.c or did you create a *.h such as spraySummary.h?
Is required any additional coding in order to use 'ofstream' into dieselfoam.c ,e.g.
#include <iostream>
#include <fstream>
using namespace std;?
Thanks.

Quote:
Originally Posted by az1362f View Post
hi

I implemented these line in dieselfoam solver to save liquid peneteration lenght in every time step,but my result showed an approximately a constant liquid penetration.(for example 10.xxxx)

std :: fstream penet
penet.open("penetration.txt",std::ios::app);
penet << dieselSpray.liquidPenetration(1.0)<<"\t"<<runTime. timeName()<<"\n"<<endl;
penet.close();

what is my mistake?
I used default setting of dieselfoam tutorials.
I attached a penetration result.
please help me.
JMP is offline   Reply With Quote

Old   June 23, 2009, 11:23
Smile liquid peneteration
  #32
Member
 
amin
Join Date: May 2009
Posts: 62
Rep Power: 16
az1362f is on a distinguished road
Hello Dear Pastor;

of course you can add these line in both place in spraysummary.h or dieslFoam.c,because dieselFoam call this *.H file in main program but I directly wrote these lines to dieselfoam.c after line :Incloude" spraysummary.h" or you can copy paste the lines inside spraysummary.h to dieselfoam.c and then write this code to dieselfoam.c.
second when you usestd::ios::app, it is enough, you don't need to write using namespace std;

regard
az1362f is offline   Reply With Quote

Old   June 23, 2009, 11:27
Default C12h26
  #33
Member
 
amin
Join Date: May 2009
Posts: 62
Rep Power: 16
az1362f is on a distinguished road
Hi Dear Dr Nordin

No,I changed Therm.dat(N-DODECANE ->C12H26) before I ran dieselfoam,but it generated this error.
what is the problem?

regard
az1362f is offline   Reply With Quote

Old   June 23, 2009, 11:28
Default C12h26
  #34
Member
 
amin
Join Date: May 2009
Posts: 62
Rep Power: 16
az1362f is on a distinguished road
Hi Dear Dr Nordin

No,I changed Therm.dat(N-DODECANE ->C12H26) before I ran dieselfoam,but it generated this error.
what is the problem?

regard
az1362f is offline   Reply With Quote

Old   June 23, 2009, 11:41
Default
  #35
JMP
New Member
 
José M. Pastor
Join Date: May 2009
Location: Valencia (Spain)
Posts: 3
Rep Power: 16
JMP is on a distinguished road
Hi John,

Thanks for your answer. I also add those lines after 'include "spraySummary.H" ' but does not work for me. I get the following compilation error

dieselFoam.C: In function âint main(int, char**)â:
dieselFoam.C:117: error: expected initializer before âstdâ
dieselFoam.C:119: error: âpenetâ no se declaró en este ámbito
make: *** [Make/linux64GccDPOpt/dieselFoam.o] Error 1

I'll keep trying...


Quote:
Originally Posted by az1362f View Post
Hello Dear Pastor;

of course you can add these line in both place in spraysummary.h or dieslFoam.c,because dieselFoam call this *.H file in main program but I directly wrote these lines to dieselfoam.c after line :Incloude" spraysummary.h" or you can copy paste the lines inside spraysummary.h to dieselfoam.c and then write this code to dieselfoam.c.
second when you usestd::ios::app, it is enough, you don't need to write using namespace std;

regard
JMP is offline   Reply With Quote

Old   June 24, 2009, 02:14
Default
  #36
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
Quote:
Originally Posted by az1362f View Post
Hi Dear Dr Nordin

No,I changed Therm.dat(N-DODECANE ->C12H26) before I ran dieselfoam,but it generated this error.
what is the problem?

regard
You are probably picking up the wrong therm.dat file.
Check thermophysicalProperties and see which file you are using.

CHEMKINThermoFile "~OpenFOAM/thermoData/therm.dat";
niklas is offline   Reply With Quote

Old   June 25, 2009, 04:29
Question validating exprimental case
  #37
Member
 
amin
Join Date: May 2009
Posts: 62
Rep Power: 16
az1362f is on a distinguished road
Hi Dear Dr Nordin;

Thanks.
yes,I make a mistake.
Now I am trying to validate a non-evaporating spray of C7H16 experiment with these characteristic:
max.injection pressure= 60 Mpa
injection duration=2.36 ms
mass of fuel= 9.84 mg
Diameter of the nozzle=0.02 cm
ambient temperature = 293 k
ambient pressure =17 bar

But my result has a large difference with experiment.
I attached a zip file including my diselfoam case setup, my tip penetration results and experiment results.

it seems that spray can not penetrate in chamber,I changed ambient pressure of 17 bar(17e+5) to (1.7e+5) and strangely my result of tip penetration were close to experiment.

I don't know what is my problem.
it seems that ambient pressure should be 1.7e+5.

please help me,I am confused.

Thanks
Regard
Attached Files
File Type: zip experiment charactristic.zip (51.5 KB, 14 views)
File Type: zip n heptane.zip (67.1 KB, 20 views)
az1362f is offline   Reply With Quote

Old   June 25, 2009, 09:44
Default
  #38
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
you cant run a 2D simulation like that.
niklas is offline   Reply With Quote

Old   June 25, 2009, 09:53
Question correct mesh
  #39
Member
 
amin
Join Date: May 2009
Posts: 62
Rep Power: 16
az1362f is on a distinguished road
hi

what is my mistake?
what is its correction?
how can i describe an axi-symmetric mesh for diesel foam?

thanks
regard

Last edited by az1362f; June 25, 2009 at 10:16.
az1362f is offline   Reply With Quote

Old   June 26, 2009, 04:40
Question 3D mesh
  #40
Member
 
amin
Join Date: May 2009
Posts: 62
Rep Power: 16
az1362f is on a distinguished road
hi Dear Niklas

what is my mistake?
what is its correction?
how can i describe an axi-symmetric mesh for diesel foam?

I ran a 3D simulation of dieselfoam with last characteristic of n-heptane experiment and add its result to a new plot and attached it.

there are two strange things:
1- I saw some fluctuations in liquid penetration curve in 3D cases.
2- likewise liquid penetration is far from experimental result.
what is the reason of these?

I set the initial drop diameter to nozzle diameter according to injector model.is it correct?

I am confused.
Please help me.

thanks
regard
Attached Images
File Type: jpg 3D 2D.jpg (43.2 KB, 25 views)

Last edited by az1362f; June 27, 2009 at 11:33.
az1362f 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



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