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

Stratified Charge Engine Combustion Chamber Design

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 4, 2011, 21:57
Default Stratified Charge Engine Combustion Chamber Design
  #1
New Member
 
Adam L
Join Date: Dec 2011
Posts: 10
Rep Power: 14
AdamL is on a distinguished road
Hello OpenFOAM world,

I am new to the forum and to OpenFOAM. I'm getting started on an engine simulation. I would greatly appreciate any insight from those of you who have run engine simulations. Here's a little background on my project:

For my capstone project my team and I are redesigning the combustion chamber of the engine of our SAE Supermileage vehicle to facilitate stratified charge combustion.

The ultimate goal for the model is to simulate airflow and the fuel spray to guide the design of the combustion chamber. Our advisor has suggested that we keep the fuel spray model as simple as possible -- he suggests modeling the spray with solid spheres.

How difficult would it be to implement something like what's used in dieselFoam?

Currently I am working on getting the moving mesh working. My first goal is to model just airflow during compression and expansion strokes. Later I will add in the fuel spray. I am having a hard time finding any documentation on how the moving engineMesh works. The mesh in KivaTest is structured in layers and it moves like an accordian. My best guess is that the points and faces is just being mapped to the new position. I also see that you define the patches for the piston, the liner and the cylinder head.

How does this engineMesh work?
Do I simply create a mesh, define patches, and set the engineGeometry object ?
Does the orientation of the mesh matter?
(ex. Does the axis of the cylinder have to be aligned in a particular direction)

Thanks in advance for your help!
AdamL is offline   Reply With Quote

Old   December 5, 2011, 16:02
Default
  #2
New Member
 
Adam L
Join Date: Dec 2011
Posts: 10
Rep Power: 14
AdamL is on a distinguished road
Anyone familiar with the engine mesh utilities?

Does anyone know of any good documentation on engineMesh?

For now I will make a mesh and assume that the mesh is remapped in-between time steps based on the position in relation of the piston patch. I'll you know how that goes.
AdamL is offline   Reply With Quote

Old   December 5, 2011, 17:50
Default
  #3
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
The cylinder axis must be aligned with the z-axis, and you must have the specified patches defined for the mesh motion to work.

With the modeling of the spray, you have a huge degree of customization through the sprayProperties and injectorProperties dictionaries. The modeling of sprays in OpenFOAM uses Lagrangian particle tracking, which is what I believe your advisor is suggesting.
mturcios777 is offline   Reply With Quote

Old   December 5, 2011, 18:14
Default
  #4
New Member
 
Adam L
Join Date: Dec 2011
Posts: 10
Rep Power: 14
AdamL is on a distinguished road
Thank you mturcios777. That's good to know.

What my advisor is suggesting is that we model with solid partials rather than particles that can breakup and evaporate. He wants us to keep it simple.

I am I correct to think that the composition of the mesh in the cylinder is unimportant? i.e. Is there any specific structure the mesh must have in the deforming portion of the cylinder?
AdamL is offline   Reply With Quote

Old   December 5, 2011, 18:53
Default
  #5
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
I've only ever used layeredMesh with structured hex mesh (in the compression region). There is a lot of flexibility, but with that comes the possibility that the particular combination you want may not work. For a student project, I would recommend to sticking to what works and keep it as similar to the tutorial as possible.

You can specify the breakup and evaporation models in sprayProperties, including having none at all.
mturcios777 is offline   Reply With Quote

Old   December 10, 2011, 22:35
Default
  #6
New Member
 
Adam L
Join Date: Dec 2011
Posts: 10
Rep Power: 14
AdamL is on a distinguished road
I'm happy to report that I have gotten my mesh working with the coldEngineFoam solver. Now onto a convergence study and then spray modeling.
AdamL is offline   Reply With Quote

Old   December 20, 2011, 23:28
Default
  #7
New Member
 
Adam L
Join Date: Dec 2011
Posts: 10
Rep Power: 14
AdamL is on a distinguished road
Is it possible to use the injection model without evaporation, breakup and chemistry?
AdamL is offline   Reply With Quote

Old   December 22, 2011, 12:26
Default
  #8
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
Yes. As I said earlier, have a look at the sprayProperties and injectorProperties dictionaries in the constant directory to change (or turn off) the spray, breakup, heat transfer and other such models. Chemistry calculations are controlled by the chemistryProperties dictionary.
mturcios777 is offline   Reply With Quote

Old   December 28, 2011, 13:41
Default
  #9
New Member
 
Adam L
Join Date: Dec 2011
Posts: 10
Rep Power: 14
AdamL is on a distinguished road
What entries necessary in the thermoPhysicalProperties dictionary when using thermoType hsPsiMixtureThermo<multiComponentMixture<gasThermo Physics>> ?
AdamL is offline   Reply With Quote

Old   January 2, 2012, 18:43
Default
  #10
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
Happy New Year (I've been on holiday and haven't been on the forum)!

If you look at the thermophysicalProperties file from the dieselFoam tutorial ($FOAM_TUTORIALS/combustion/dieselFoam/aachenBomb) will be a file sufficient to run. Note that you will need a chemkin folder and chem.inp file: just copy the folder over and you should be fine.
mturcios777 is offline   Reply With Quote

Old   January 6, 2012, 12:21
Default
  #11
New Member
 
Adam L
Join Date: Dec 2011
Posts: 10
Rep Power: 14
AdamL is on a distinguished road
Happy New Year!

I have good news...

Air is flowing in the virtual engine using solver dieselEngine. See attched screenshot.

I have some parameters for the injector set, but have not simulated any spray yet...

[IMG]file:///D:/MyDocs/Desktop/streamTracer.PNG[/IMG]
Attached Images
File Type: jpg streamTracer.jpg (18.8 KB, 48 views)

Last edited by AdamL; January 6, 2012 at 13:23.
AdamL is offline   Reply With Quote

Old   January 6, 2012, 12:30
Default
  #12
New Member
 
Adam L
Join Date: Dec 2011
Posts: 10
Rep Power: 14
AdamL is on a distinguished road
I also have bad news... (maybe not that bad...)

After 45 BTDC the simulation crashes. My best guess is that there is a problem with the mesh. Maybe I'm paying the price for a shortcut that I took while making the mesh:
The mesh being used was created using STL surfaces and snappyHexMesh. The cylinder mesh has no specific form.

Here's the error:
Courant Number mean: 0.224104 max: 217.678
Crank angle = -42.75 CA-deg
deltaZ = 7.3878e-05
clearance: 0.00551224
Piston speed = 6.38306 m/s
Solving chemistry
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/libc.so.6"
#3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/dieselEngineFoam"
#5
in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/dieselEngineFoam"
#6 __libc_start_main in "/lib/libc.so.6"
#7
in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/dieselEngineFoam"
Floating point exception
Does this seem like it could be a mesh related problem?
AdamL is offline   Reply With Quote

Old   January 6, 2012, 12:48
Default
  #13
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
Quote:
Originally Posted by AdamL View Post
I also have bad news... (maybe not that bad...)

After 45 BTDC the simulation crashes. My best guess is that there is a problem with the mesh. Maybe I'm paying the price for a shortcut that I took while making the mesh:
The mesh being used was created using STL surfaces and snappyHexMesh. The cylinder mesh has no specific form.

Here's the error:
Courant Number mean: 0.224104 max: 217.678
Crank angle = -42.75 CA-deg
deltaZ = 7.3878e-05
clearance: 0.00551224
Piston speed = 6.38306 m/s
Solving chemistry
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/libc.so.6"
#3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/dieselEngineFoam"
#5
in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/dieselEngineFoam"
#6 __libc_start_main in "/lib/libc.so.6"
#7
in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/dieselEngineFoam"
Floating point exception
Does this seem like it could be a mesh related problem?
The reason the run crashes is because of a call to sqrt somewhere, so you might have either a negative quantity or NAN. Your maximum Courant number is HUGE, which means somewhere in your domain U*dt/dx has blown up, probably due to a tiny dx. If you are using layered mesh, then the usual way around this problem is to stop your simulation before the aspect ratio of your cells gets too extreme (I use 2:1 as my threshold, more a rule of thumb), then remesh the domain with a new density and map the old fields over. Divide up the cycle into several cases (like case1, case2, case3) just in case you need to tweak your remeshing periods. Its helpful to write a bash script to handle the transition from one phase to the next.

Let me know if you have questions about this procedure. Good luck!
mturcios777 is offline   Reply With Quote

Old   January 6, 2012, 13:19
Default
  #14
New Member
 
Adam L
Join Date: Dec 2011
Posts: 10
Rep Power: 14
AdamL is on a distinguished road
Ah ha! Thank you! I'll give it a try let you know how it goes.

I do have a few questions before I give it a try:

Do you use any routines to output aspect ratio and do it automatically or do you just think/calculate it out before hand?

Also, do you have any recommendations for how to re-mesh? My first thought is to go back to snappy hexMesh and re-mesh the whole thing then use mapFields to swap the data over to the new mesh. Re-meshing from STL's in snappyHexMesh would be somewhat of a hassle though...

How hard would it be to make the combustion chamber mesh in snappyHexMesh, make the cylinder with extrude2DMesh and combine the two meshes?

Thanks!
Adam
AdamL is offline   Reply With Quote

Old   January 6, 2012, 13:47
Default
  #15
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
There isn't a strict method, but an odd number of cases works well since you'll probably want a single phase right around TDC. They don't necessarily have to by symmetric (but it makes it easier to start with), and going beyond 5 seems like its too much work, so I'd say 3-5, remembering that when the piston is travelling fastest is when you are going to see the greatest change in aspect ratio.

Your remeshing approach sounds good, remember that since you are doing the same operation over again (just on a different dataset) scripting is your friend.

I've considered an approach like that but haven't pursued it seriously. You could try using mergeMeshes, though since the matchup between the combustion chamber STL and the cylinder won't be perfect there may be issues there. If you decide to go that route and get it working be sure to post results, I'm sure many people would be grateful (I'd be first in line to give you a high-five)!
mturcios777 is offline   Reply With Quote

Old   January 27, 2012, 20:47
Default
  #16
New Member
 
Adam L
Join Date: Dec 2011
Posts: 10
Rep Power: 14
AdamL is on a distinguished road
Hello again.

Not much has happened on the CFD front of the project lately. I've been spending lots of time modeling the dynamics of the injector. I have successfully re-meshed the engine and the simulation continues. No fancy meshing programs have been written... yet...

I am wondering: how is a moving mesh solved? Is a element size term formulated in the conservation equations? or is it some kind of in-between-time-step thing? A remapping onto the new deformed or moved mesh?
AdamL 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
Diesel Engine combustion chamber analysis sachinthakre FLUENT 12 August 13, 2013 14:14
ICEM CFD-- ic engine combustion chamber meshing chetan mundhe CFX 15 July 22, 2012 18:34
CFD of combustion process of Homogeneous Charge Compression Engine (HCCI) kelvinlim Main CFD Forum 2 January 26, 2012 22:19
I need design planes of combustion chamber HITACHI GE AdidaKK Main CFD Forum 0 July 2, 2009 14:04
Info: Short Course On Thermal Design of Electronic Equipment Arnold Free Main CFD Forum 0 August 10, 1999 10:18


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