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

Needing some advise about dieselEngineFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 20, 2005, 05:38
Default Hi all, I want to simulate
  #1
Member
 
Ervin Adorean
Join Date: Mar 2009
Posts: 76
Rep Power: 17
adorean is on a distinguished road
Hi all,

I want to simulate a DI Diesel engine combustion using a 3D, 45 deg. sector mesh.
I have found on the forum how to add engine swirl, as explained by Niklas Nordin somewhere in 2004.

1) How and where can the injector (nozzle) orientation be defined?

2) Can somebody please give me a (detailed, if possible) list of the directories, files and parameters that needs to be defined for a dieselEngineFoam case?

I suppose it should be a combination of dieselFoam and engineFoam, but I don't want to start this by guessing.

Thank you!

Ervin
adorean is offline   Reply With Quote

Old   April 20, 2005, 05:46
Default 1, in the constant/injectorPro
  #2
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
1, in the constant/injectorProperties
2, in the constant directory.

what each dictionary controls should be clear by it's name

N
niklas is offline   Reply With Quote

Old   April 20, 2005, 06:33
Default Thanks!
  #3
Member
 
Ervin Adorean
Join Date: Mar 2009
Posts: 76
Rep Power: 17
adorean is on a distinguished road
Thanks!
adorean is offline   Reply With Quote

Old   April 20, 2005, 08:16
Default Hi, direction (1 0 0) means
  #4
Member
 
Ervin Adorean
Join Date: Mar 2009
Posts: 76
Rep Power: 17
adorean is on a distinguished road
Hi,

direction (1 0 0) means that the injector is oriented along the positive x axis.

To rotate it 30 deg. along the y and z axes, is it correct:
direction (0 30 30) or the angle should be expressed in radians?
direction (0 pi/6 pi/6)?
Or it's none of these?

Thanks

Ervin
adorean is offline   Reply With Quote

Old   April 20, 2005, 08:26
Default Hi, the direction you need
  #5
Member
 
Tommaso Lucchini
Join Date: Mar 2009
Posts: 87
Rep Power: 17
lucchini is on a distinguished road
Hi,

the direction you need is

(cos(pi/6) sin(pi/6) 1.0/cos(pi/6))
lucchini is offline   Reply With Quote

Old   April 20, 2005, 08:29
Default > direction (1 0 0) means that
  #6
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
> direction (1 0 0) means that the injector is oriented along the positive x axis.
yes.

none of these.

I dont understand, what is unclear with the meaning 'direction'?

N
niklas is offline   Reply With Quote

Old   April 20, 2005, 08:34
Default Well, now it's clear.
  #7
Member
 
Ervin Adorean
Join Date: Mar 2009
Posts: 76
Rep Power: 17
adorean is on a distinguished road
Well, now it's clear.
adorean is offline   Reply With Quote

Old   April 22, 2005, 07:05
Default Hi, A few more questions ab
  #8
Member
 
Ervin Adorean
Join Date: Mar 2009
Posts: 76
Rep Power: 17
adorean is on a distinguished road
Hi,

A few more questions about dieselEngineFoam.
The mesh I'm using: 1/8 sector, 3D.

1) the injected mass 'mass' in 'injectorProperties' is the total injected mass by the injector/cycle or is the mass injected by 1 nozzle of the injector/cycle?

2) the mass flow rate profile, 'massFlowRateProfile' can also be expressed as a function of CAD vs. mass flow rate (if yes, how) or only as a function of time vs. mass flow rate?

Thanks.

Ervin
adorean is offline   Reply With Quote

Old   April 22, 2005, 08:06
Default 1. its the total mass injected
  #9
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
1. its the total mass injected by that injector. there's no periodicity in the time, since time is always increased, so a SOI of for instance -12 CAD will never happen more than once.

2. yes, for dieselEngineFoam it MUST be expressed in CAD's, since this is the 'time'.
niklas is offline   Reply With Quote

Old   April 25, 2005, 13:17
Default Hi, Trying to run dieselEng
  #10
Member
 
Ervin Adorean
Join Date: Mar 2009
Posts: 76
Rep Power: 17
adorean is on a distinguished road
Hi,

Trying to run dieselEngineFoam, but got this error.
Can somebody tell me what kind of error is this, and how can it be avoided/corrected?

Create engine time

Create mesh for time = -0.02


Reading thermophysicalProperties
Selecting thermodynamics package hMixtureThermo<reactingmixture>
Selecting chemistryReader chemkinReader
Reading field U

Reading/calculating face flux field phi

Creating turbulence model.

Selecting turbulence model RNGkEpsilon
Creating field DpDt

polyMesh::parallelData() const : Constructing parallelData from processor topology
This needs the patch faces to be correctly matched
Constructing chemical mechanism
Selecting ODE solver SIBS
chemistryModel::chemistryModel: Number of species = 5 and reactions = 1

Reading environmentalProperties
Reading combustion properties

Constructing Spray
Selecting injectorType commonRailInjector
Selecting atomizationModel off
Selecting dragModel standardDragModel
Selecting evaporationModel standardEvaporationModel
Selecting heatTransferModel RanzMarshall
Selecting wallModel reflect
Selecting breakupModel ReitzKHRT
Selecting collisionModel off
Selecting dispersionModel gradientDispersionRAS
Selecting injectorModel constInjector
Average Velocity for injector 0: 5.62148e+06 m/s, injection pressure = 1200 bar
Constructing three dimensional spray injection.
deckHeight: -0.0434871
piston position: 0
Total cylinder mass: 0.000673331

Starting time loop

--> FOAM Warning : Requested reference cell 0 is on a constraint boundary, selecting reference cell 1

Max Courant Number = 0

Crank angle = -179.75 CA-deg
deltaZ = 4.8849e-07
tmp<scalarfield> polyMesh::movePoints(const pointField&) : Moving points for time -0.0199722 index 1
bool primitiveMesh::checkMeshMotion(const pointField& newPoints, const bool report) const: checking mesh motion
Min volume = 3.99657e-11. Total volume = 0.000243964. Cell volumes OK.
Min area = 3.3873e-08. Face areas OK.
Pyramid volumes OK.
Non-orthogonality check OK.
Mesh motion check OK.
clearance: -0.0434876
Piston speed = 0.0175857 m/s


--> FOAM FATAL ERROR : face 0 and 1778 areas do not match by 0.0249476% -- possible face ordering problem

Function: cyclicFvPatch::makeWeights(scalarField& w) const
in file: meshes/fvMesh/fvPatches/derivedFvPatches/cyclicFvPatch/cyclicFvPatch.C at line: 62.

FOAM aborting

Thanks.

Ervin
adorean is offline   Reply With Quote

Old   April 25, 2005, 14:11
Default This means that your cyclics d
  #11
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
This means that your cyclics don't match. Probably they don't match on the starting mesh.

Did you follow all the steps:
- have binary mesh writing enabled
- set startTime to latestTime
- convert mesh from Gambit or whatever mesh generator you use.
- create a cyclic patch from the two halves ('createPatch')
- copy back the resulting mesh to the constant directory
- reorder the cyclic patch faces
('couplePatches')
- copy back the resulting mesh to the constant directory
- try rerunning the couplePatches util. It should now not complain.

If you want to do engines: layer addition/removal with cyclics has problems and will probably not work.
mattijs is offline   Reply With Quote

Old   April 26, 2005, 05:12
Default Hi Mattijs, What's this err
  #12
Member
 
Ervin Adorean
Join Date: Mar 2009
Posts: 76
Rep Power: 17
adorean is on a distinguished road
Hi Mattijs,

What's this error? Appears at createPatch.

--> FOAM FATAL IO ERROR : cannot open file

file: /home/ervin/OpenFOAM/ervin-1.1/run/tutorials/dieselEngineFoam/motor5/system/crea tePatchDict at line 0.

Function: regIOobject::readStream(const word&)
in file: db/regIOobject/regIOobjectRead.C at line: 68.

FOAM exiting

Ervin
adorean is offline   Reply With Quote

Old   April 26, 2005, 05:26
Default Hmmm... -> FOAM FATAL IO ER
  #13
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
Hmmm...

-> FOAM FATAL IO ERROR : cannot open file
self-explanatory...

file: /home/ervin/OpenFOAM/ervin-1.1/run/tutorials/dieselEngineFoam/motor5/system/crea tePatchDict at line 0.
self-explanatory...

an example of the dictionary can be found here
utilities/mesh/manipulation/createPatch/


N
niklas is offline   Reply With Quote

Old   April 26, 2005, 05:41
Default See also http://www.cfd-onl
  #14
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
See also

http://www.cfd-online.com/cgi-bin/Op...st=997#POST997
mattijs is offline   Reply With Quote

Old   April 26, 2005, 07:06
Default Hi, The last run of 'couple
  #15
Member
 
Ervin Adorean
Join Date: Mar 2009
Posts: 76
Rep Power: 17
adorean is on a distinguished road
Hi,

The last run of 'couplePatches' produces this:

"Create morphMesh for time = -180

Mesh has coupled patches ...

Testing for correct face ordering ...
cyclicPolyPatch::order : Found 53 on patch slice where the cos of the angle between two connected faces was less than 0.9
cyclicPolyPatch::order : Writing zone 0 face centres to OBJ file "slice_zone_0.obj"
cyclicPolyPatch::order : Writing zone 1 face centres to OBJ file "slice_zone_1.obj"
cyclicPolyPatch::order : Number of faces per zone:2{1778}
cyclicPolyPatch::geometricOrder : Rotation : n00 0 1) n1-0.707107 0 -0.707107)
cyclicPolyPatch::order : Dumping newly found cyclic match as lines between corresponding face centres to file "slice_faceCentres.obj"
Patch face ordering OK.
Coupled patch face ordering ok. Nothing changed ...

End"


Except the complaint about those 53 faces "where the cos of the angle between two connected faces was less than 0.9" I don't see nothing wrong.

The 53 faces are the ones situated on the cylinder axis. The angle is 45 deg., so of course that cos is less then 0.9. Is this a problem?

Running the case produces the above mentioned "FOAM FATAL ERROR : face 0 and 1778 areas do not match by 0.0249476% -- possible face ordering problem " error.


Any hints? What am I doing wrong?

The controlDict is:

applicationClass dieselEngineFoam;

startFrom startTime;

startTime -180;

stopAt endTime;

endTime 30;

deltaT 0.25;

writeControl runTime;

writeInterval 5;

cycleWrite 0;

writeFormat ascii;

writePrecision 12;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

adjustTimeStep no;

maxCo 0.2;

maxDeltaT 1.0;


Thanks!

Ervin
adorean is offline   Reply With Quote

Old   April 26, 2005, 08:48
Default couplePatches seems to find no
  #16
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
couplePatches seems to find no problems. Have a look at the file

slice_faceCentres.obj

it creates. (with e.g. javaview or run objToVTK and use vtk). It will show the connected (centres of) faces.

The tolerance issue has been discussed before on this site. Use the 'search' functionality to find these.
mattijs is offline   Reply With Quote

Old   April 28, 2005, 06:11
Default Hello, Can somebody please
  #17
Member
 
Ervin Adorean
Join Date: Mar 2009
Posts: 76
Rep Power: 17
adorean is on a distinguished road
Hello,

Can somebody please tell me some guidelines for a control dictionary for 'dieselEngineFoam'?

- Courant number should be kept around 1?
- deltaT=? for compression & injection?
- adjustTimeStep no/yes?
- maxDeltaT?

Thanks!

Ervin
adorean is offline   Reply With Quote

Old   April 28, 2005, 06:17
Default In spray calculations, I found
  #18
kärrholm
Guest
 
Posts: n/a
In spray calculations, I found that a courant number around 0.1 works better. 1 sounds way off to me.

deltaT is just the initial parameter, as long as you have adjustTimeStep yes (which I think you should have). So set it around 1e-8 to be safe.

maxDeltaT, I'm not sure this one matters, I heard it's a part of an old code, but I usually set it to around 1e-6.

/Fabian
  Reply With Quote

Old   April 28, 2005, 06:22
Default OK, Fabian. Thanks. Ervi
  #19
Member
 
Ervin Adorean
Join Date: Mar 2009
Posts: 76
Rep Power: 17
adorean is on a distinguished road
OK, Fabian.

Thanks.

Ervin
adorean is offline   Reply With Quote

Old   April 28, 2005, 06:24
Default maxDeltaT in an engine simulat
  #20
Member
 
Tommaso Lucchini
Join Date: Mar 2009
Posts: 87
Rep Power: 17
lucchini is on a distinguished road
maxDeltaT in an engine simulation is the MAXIMUM CRANK ANGLE (and not the TIME STEP) and it should be kept around 0.1
usually you have to set something like
adjustTimeStep yes;
maxDeltaT 0.1;
maxCo 0.1;
but you have also to investigate how the solution changes with the maxCo value.
bye
lucchini 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
DieselEngineFoam stefanke OpenFOAM Pre-Processing 42 December 3, 2008 23:53
Strange pressure with dieselEngineFoam tsencic OpenFOAM Bugs 1 December 12, 2007 05:39
Start with DieselEngineFoam tsencic OpenFOAM Running, Solving & CFD 20 June 28, 2007 22:07
needing a udf for d(rho*h)/dt*dv??please help!! Asghari FLUENT 0 October 30, 2006 23:06
NEEDING SOME GOOD ARTICLE ABOUT CFD AND ITS APP.. mahdi heidari Main CFD Forum 0 October 9, 2001 06:13


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