CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

DieselEngineFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 30, 2005, 08:02
Default As far as I known the dieselEn
  #1
Member
 
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 8
stefanke is on a distinguished road
As far as I known the dieselEngineFoam is the only solver that does not currently have a tutorial case or FoamX configuration!

Has anybody out there an existing FoamX config or at least a complete set of dictionaries for the dieselEngine solver?

Any help is very appreciated.

cheers
Stephan
stefanke is offline   Reply With Quote

Old   December 30, 2005, 08:54
Default Hi Stefan, dieselEngineFoam
  #2
Member
 
Tommaso Lucchini
Join Date: Mar 2009
Posts: 82
Rep Power: 8
lucchini is on a distinguished road
Hi Stefan,
dieselEngineFoam has not a tutorial, but, as you can see in the $FOAM_TUTORIALS/ directory there are the tutorials of dieselFoam and engineFoam.
dieselEngineFoam is dieselFoam with the moving mesh (have a look at the code of both solvers).
So the only difference in a case setup between dieselFoam and dieselEngineFoam is that you need to put in the /constant/ directory the file engineGeometry. To better understand how dieselFoam and engineFoam works you can run both the tutorials (aachenBomb and kivaTest).

In the aachenBomb case focus on the following files:
constant/sprayProperties
constant/injectorProperties
constant/thermophysicalProperties
constant/chemistryProperties

In the kivaTest file have a look to
constant/engineGeometry
system/controlDict
and look at the mesh, and see that the patches requires particular names (piston, liner, cylinderHead).
Then try to merge the two tutorial and have fun!
bye
Tommaso
lucchini is offline   Reply With Quote

Old   December 30, 2005, 10:34
Default I try to "merge" the two cases
  #3
Member
 
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 8
stefanke is on a distinguished road
I try to "merge" the two cases to get a setup for the dieselEngine solver. I use the same mesh as the engineFoam case to get rid of mesh problems.

Nevertheless the calculation fails:

Number of parcels in system | 0
Injected liquid mass....... | 0 mg
Liquid Mass in system...... | 0 mg
SMD, Dmax.................. | 0 mu, 0 mu
Added gas mass = -1.71521e-10 mg
Evaporation Continuity Error| -1.71521e-10 mg
ExecutionTime = 240.61 s


Mean and max Courant Numbers = 0.000929914 31.5694
deltaT = 8.74482e-10
Crank angle = -175.033 CA-deg
deltaZ = 3.57846e-10
clearance: 0.0855261
Piston speed = 0.409209 m/s
volume continuity errors : sum local = 1.10786e-15, global = -5.78031e-18
Solving chemistry
BICCG: Solving for Ux, Initial residual = 0.929704, Final residual = 4.04514e-07, No Iterations 12
BICCG: Solving for Uy, Initial residual = 0.902951, Final residual = 6.88233e-07, No Iterations 12
BICCG: Solving for Uz, Initial residual = 0.909879, Final residual = 4.33674e-07, No Iterations 12
BICCG: Solving for O2, Initial residual = 0.884681, Final residual = 7.73892e-07, No Iterations 12
BICCG: Solving for h, Initial residual = 0.852227, Final residual = 5.31857e-07, No Iterations 12


--> FOAM FATAL ERROR : attempt to use janafThermo<equationofstate> out of temperature range 200 ->
5000; T = 113.962

From function janafThermo<equationofstate>::checkT(const scalar T) const
in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.2/src/thermophysicalModels/specie/lnInclude/ janafTh
ermoI.H at line 73.

FOAM aborting


- Why there is no injected fuel
- How to handle the begin (start) of injection

injector setup:
---------------
injectorType unitInjector;

unitInjectorProps
{
position (0.03 0 0.0995);
direction (0 0 1);
diameter 0.00019;
Cd 0.9;
mass 6e-06;
temperature 320;
nParcels 5000;


Any ideas ?
stefanke is offline   Reply With Quote

Old   December 30, 2005, 15:00
Default Hi, It seems to me there is a
  #4
Member
 
Tommaso Lucchini
Join Date: Mar 2009
Posts: 82
Rep Power: 8
lucchini is on a distinguished road
Hi,
It seems to me there is a huge Courant Number.

What did you set in the controlDict file for deltaT?

What boundary conditions are you using for T, p, O2, N2, k and epsilon? Are they correct?

Also: the injectorProperties file for the dieselFoam has the injection law depending on time and not by the crank angle, as you have to set in the dieselEngineFoam case. So if you start a case from -180 and the injection law start from 0 you don't have injected particles till you reach 0 Crank Angles.

I hope this could help you a little bit. Keep on.
Bye
Tommaso
lucchini is offline   Reply With Quote

Old   December 30, 2005, 16:02
Default control dict: -------------
  #5
Member
 
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 8
stefanke is on a distinguished road
control dict:
-------------
adjustTimeStep yes;
maxCo 0.1;
maxDeltaT 1.0;

boundary conditions:
--------------------
T,p,k,epsilon - engineFoam default
O2,N2,Ydefault- zero gradient

injection start:
----------------
You are right, the injection law is depending on time and not by CA but how can I define the injection start time or CA.

Has anyone out there a setup for the dieselEngine solver which works? If so feel free to post! I think a lot of people are insterested in.


Stefan
stefanke is offline   Reply With Quote

Old   January 6, 2006, 08:33
Default is there anybody who can help
  #6
Member
 
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 8
stefanke is on a distinguished road
is there anybody who can help ?
stefanke is offline   Reply With Quote

Old   January 12, 2006, 05:40
Default Hello, what averaged Veloci
  #7
New Member
 
Marcus Ende
Join Date: Mar 2009
Posts: 4
Rep Power: 8
m_ende is on a distinguished road
Hello,

what averaged Velocity and pressure write dieselEngineFoam out ?
m_ende is offline   Reply With Quote

Old   January 12, 2006, 06:39
Default Hi, as you can see from the
  #8
Member
 
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 8
stefanke is on a distinguished road
Hi,

as you can see from the dieselEngine (logSummary.H) code

mean p: spacial mean value of the pressure of the computational domain.

mean u': mean (time+space) turbulent velocity fluctuation

hth

p.s are you able to compute the case (dieselEngine) successfuly? My computation cancels after -66 CA with an error!
stefanke is offline   Reply With Quote

Old   January 12, 2006, 06:43
Default Can anyone help me with this e
  #9
Member
 
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 8
stefanke is on a distinguished road
Can anyone help me with this error.

from CA -180 to -66 all is ok but then the following error occurs:

--> FOAM FATAL ERROR : attempt to use janafThermo<equationofstate> out of temperature range 200 -> 5000; T = 5101.98

From function janafThermo<equationofstate>::checkT(const scalar T) const
in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.2/src/thermophysicalModels/specie/lnInclude/ janafThermoI.H at line 73.

FOAM aborting

time step properties:

adjustTimeStep yes;
maxCo 0.2;
maxDeltaT 0.01;


I use the kivaTest Mesh from the engineFoam tutorial!
stefanke is offline   Reply With Quote

Old   January 12, 2006, 08:52
Default I mean the averaged velocity a
  #10
New Member
 
Marcus Ende
Join Date: Mar 2009
Posts: 4
Rep Power: 8
m_ende is on a distinguished road
I mean the averaged velocity and injector pressure at the begin of calculation ?

The error I think comes from a unstable solution of the Enthalpy equation. Have you chemistry solve on ???
m_ende is offline   Reply With Quote

Old   January 12, 2006, 09:02
Default Those values are incorrect for
  #11
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
Those values are incorrect for engines, since
the values are based on the average pressure
at the start of the simulation.

Maybe they should be removed for moving meshes,
but I've kept them since I like to have that info
to check that the input is descent.
if you want to check that these values are
physically sound,
estimate the pressure at SOI and set that value as reference in -180/p, run the code and see what you get.

...and for the non-working dieselEngineFoam case,
try setting
momentumPredictor off in the PISO-dictionary
in fvSolution.

N
niklas is offline   Reply With Quote

Old   January 12, 2006, 09:31
Default Hi Niklas, I have already t
  #12
Member
 
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 8
stefanke is on a distinguished road
Hi Niklas,

I have already tried to set momentumPredicator off but the problem still exists. As I already mentioned above the calculation aborts after -66,5 CA reproducible.

Here are the setup (fvSolution/fvSchemes) I use:


fvSolution:
-----------

solvers
{
rho ICCG 1e-06 0;
U BICCG 1e-06 0;
p ICCG 1e-09 0;
Yi BICCG 1e-06 0;
h BICCG 1e-06 0;
k BICCG 1e-06 0;
epsilon BICCG 1e-06 0;
}

PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
momentumPredictor off;
}


fvSchemes:
----------

ddtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
}

divSchemes
{
default none;
div(phi,rho) Gauss limitedLinear 1;
div(phi,U) Gauss limitedLinearV 1;
div(phiU,p) Gauss linear;
div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
div(phi,Yi_h) Gauss upwind;
div(phi,fu_ft_h) Gauss multivariateSelection
{
fu limitedLinear 1;
ft limitedLinear 1;
h limitedLinear 1;
};
div((muEff*dev2(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
laplacian(muEff,U) Gauss linear corrected;
laplacian(muEff,ft) Gauss linear corrected;
laplacian(muEff,fu) Gauss linear corrected;
laplacian(((alphah*mut)+alpha),h) Gauss linear corrected;
laplacian((rho|A(U)),p) Gauss linear corrected;
laplacian(rhoD,k) Gauss linear corrected;
laplacian(rhoD,epsilon) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
interpolate(HbyA) linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
p;
}

other:
------

chemistry off
no fuel injection


Do you have a clue what is going wrong here?
stefanke is offline   Reply With Quote

Old   January 12, 2006, 10:26
Default Yes I think I have a clue what
  #13
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
Yes I think I have a clue whats going on.
you're doing non-linear CFD on a complex mesh,
it crashes easily then.

try with nNonOrthogonalCorrectors 1
and upwind for all variables.

I would reduce the convergence criteria for Yi to 10e-7 also.

N
niklas is offline   Reply With Quote

Old   January 12, 2006, 11:12
Default Niklas, as recommended I ch
  #14
Member
 
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 8
stefanke is on a distinguished road
Niklas,

as recommended I changed the follwing parameters:

Yi BICCG 1e-07 0;
nNonOrthogonalCorrectors 1;
momentumPredictor off;

div(phi,rho) Gauss upwind;
div(phi,U) Gauss upwind;
div(phiU,p) Gauss upwind;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,Yi_h) Gauss upwind;

all other parameters are unchanged.

but the problems still exists
stefanke is offline   Reply With Quote

Old   January 12, 2006, 11:17
Default Wow, that was fast... I sur
  #15
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
Wow, that was fast...

I sure hope you didnt restart from the latest
result, it sounds like it already has gone wrong there.

Remove the last result directory and restart from an earlier solution.
Also start from -180 with these settings and see if the problem persists.

N
niklas is offline   Reply With Quote

Old   January 12, 2006, 11:37
Default Niklas, thanks for you supp
  #16
Member
 
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 8
stefanke is on a distinguished road
Niklas,

thanks for you support so far!

Sorry for my ignorance but what do you mean with "... and upwind for all variables"

set upwind for all convection terms set all interpolation schemes to upwind?

what`s about: div(phi,fu_ft_h) Gauss multivariateSelection, set this to upwind too?

btw: have you got a setup which works and you are able to email me?

>Remove the last result directory and restart from an earlier solution.

Ok I started with -80 CA but it crashes as before at -66.5 CA! I am gonna restart the calculation from -180CA but I think this doesn`t help ...
stefanke is offline   Reply With Quote

Old   January 12, 2006, 11:37
Default Niklas, thanks for you supp
  #17
Member
 
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 8
stefanke is on a distinguished road
Niklas,

thanks for you support so far!

Sorry for my ignorance but what do you mean with "... and upwind for all variables"

set upwind for all convection terms set all interpolation schemes to upwind?

what`s about: div(phi,fu_ft_h) Gauss multivariateSelection, set this to upwind too?

btw: have you got a setup which works and you are able to email me?

>Remove the last result directory and restart from an earlier solution.

Ok I restarted from -80 CA but it crashes as before at -66.5 CA! I am gonna restart the calculation from -180CA but I think this doesn`t help ...
stefanke is offline   Reply With Quote

Old   January 12, 2006, 15:52
Default the same problem occurs when I
  #18
Member
 
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 8
stefanke is on a distinguished road
the same problem occurs when I restart my calc from -180 CA

I have changed my mesh to a simple wedge geomerty and now the calc proceed successfully. It seems to be a mesh problem.

I use the provided KivaTest mesh from the egineFoam tutorial. I think this mesh should work!

Niklas (other peoples are welcome too) what do you think about this?
stefanke is offline   Reply With Quote

Old   January 13, 2006, 09:32
Default That mesh is pretty bad and i
  #19
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 20
niklas will become famous soon enoughniklas will become famous soon enough
That mesh is pretty bad and
it looks like it needs some outercorrectors...

The problem is in the highly distorted cells,
which requires some extra corrections for the
enthalpy.

use this
PISO
{
nOuterCorrectors 3;
nCorrectors 1;
nNonOrthogonalCorrectors 1;
momentumPredictor off;
}

Should work.

N
niklas is offline   Reply With Quote

Old   January 13, 2006, 09:40
Default thanks I will try your PISO se
  #20
Member
 
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 8
stefanke is on a distinguished road
thanks I will try your PISO setup.

another problem is that there is no combustion (signifiant pressure or temperature gain) altough I enabled the chemistry (15species, 39reations).
stefanke is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable injection in dieselEngineFoam francesco OpenFOAM Running, Solving & CFD 0 November 26, 2008 02:23
Strange pressure with dieselEngineFoam tsencic OpenFOAM Bugs 1 December 12, 2007 05:39
Needing some advise about dieselEngineFoam adorean OpenFOAM Running, Solving & CFD 33 November 20, 2007 00:27
Start with DieselEngineFoam tsencic OpenFOAM Running, Solving & CFD 20 June 28, 2007 21:07


All times are GMT -4. The time now is 23:11.