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

3D engine simulation & error

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 11, 2013, 16:28
Default
  #21
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 494
Rep Power: 9
mturcios777 is on a distinguished road
If you take the derivative of the lift profile you will get the velocity profile, then just format it as a table and input it in the boundary conditions file.

The piston is handled automatically through the engineGeometry file. As far opening and closing the valve, it involves having different meshes where some have the port geometry and some don't. You will need to map the field between the different meshes using mapFields. A bash script (look it up, there are many tutorials) would help you automate this. You can also look at the Allrun scripts that exist on many of the tutorials to find out how they work.
mturcios777 is offline   Reply With Quote

Old   April 11, 2013, 16:49
Default
  #22
Member
 
sasan
Join Date: Sep 2012
Posts: 98
Rep Power: 2
sasanghomi is on a distinguished road
Thanks for your reply marco ,
I really appreciate your help..
it means that I must create four different mesh for 4 strokes...it is right?
for example after end of induction I should use mapfields(inconsistent) for continuing the simulation.. am I right?
Also I must stitch mesh in the sliding interface..and the mesh should be one region.
another question: engineFoam have some files about combustion but I want to simulate cold flow how can I inactive them?
Also what is the boundary condition for piston in the pointMotionUx file?

thank you very much dear marco
best regards
sasan.
sasanghomi is offline   Reply With Quote

Old   April 11, 2013, 16:53
Default
  #23
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 494
Rep Power: 9
mturcios777 is on a distinguished road
piston can have fixedValue (0 0 0). The way fvMotionSolver works is that first the piston points are moved explicitly according to the engineGeometry file (RPM and connecting rod length, etc). Then the motionSolver moves the points according to pointMotionU and the velocity of the piston points.

I would recommend having all the boundaries except the liner and valves be fixedValue (0 0 0). The valves should have a velocity profile, and the liner should be slip type (at least that works best for me).
mturcios777 is offline   Reply With Quote

Old   April 11, 2013, 16:57
Default
  #24
Member
 
sasan
Join Date: Sep 2012
Posts: 98
Rep Power: 2
sasanghomi is on a distinguished road
thank you very much marco,

engineFoam have some files about combustion but I want to simulate cold flow how can I inactive them?

best regards
sasanghomi is offline   Reply With Quote

Old   April 11, 2013, 16:59
Default
  #25
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 494
Rep Power: 9
mturcios777 is on a distinguished road
Sorry I forgot to address that one. Just turn off ignition in combustionProperties.
mturcios777 is offline   Reply With Quote

Old   April 11, 2013, 17:03
Default
  #26
Member
 
sasan
Join Date: Sep 2012
Posts: 98
Rep Power: 2
sasanghomi is on a distinguished road
thank you very much marco,
I will try to do it and I report the result.
thank you very much again.

best regards,
sasan
sasanghomi is offline   Reply With Quote

Old   April 13, 2013, 13:50
Default
  #27
Member
 
sasan
Join Date: Sep 2012
Posts: 98
Rep Power: 2
sasanghomi is on a distinguished road
Hi Dear Marco,

a good day to you.
I have some questions :

1)You said that I should use map field so I should generate some different geometry. For example in my case the intake valve closed at CAD=200 (this position is not BTD) So I have a geometry untill CAD=200 and for continuing the simulation I should create a new geometry without any valves But I don't have the position of piston at this CAD..How can I find the position of piston at this CAD for generating a new geometry??

2) please take a look at the dynamicMeshDict and engineGeometry...are they correct?

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM Extend Project: Open Source CFD        |
|  \\    /   O peration     | Version:  1.6-ext                               |
|   \\  /    A nd           | Web:      www.extend-project.de                 |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      binary;
    class       dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

motionSolver          velocityLaplacian ;

diffusivity     uniform;

// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM Extend Project: Open Source CFD        |
|  \\    /   O peration     | Version:  1.6-ext                               |
|   \\  /    A nd           | Web:      www.extend-project.de                 |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      engineGeometry;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

engineMesh     fvMotionSolver;
motionSolver        z ;  //What is this???
ignite              no;
conRodLength    conRodLength [0 1 0 0 0 0 0] 132.56459;

bore            bore [0 1 0 0 0 0 0] 100;

stroke          stroke [0 1 0 0 0 0 0] 92;

clearance       clearance [0 1 0 0 0 0 0] 7.126193;

rpm             rpm [0 0 -1 0 0 0 0] 1500;


// ************************************************************************* //
what is the motion solver in the enginGeometry?? If I set it aaa the openfoam doesn't know it as an invalid type and it needs pointMotionUaaa in the 0 directory.For example I set it z So I must have a pointMotionUz file in the 0 directory for running...
and when I create a pointMotionUz in this file all boundary condition should be scalar and fixedvalue (0 0 0) is an invalid type...why??

3) I have some problems for boundary condition for valve in the pointMotionU..
I set it as a table that the left side is CAD and the right side is velocity of valve but it is mistake :

valve1
{
CAD velocity of valve
. .
. .
. .
. .
}

How can I create this profile?why this form is mistake?

please guide me.
I appreciate your help.
Thank you very much.
best regards,
Sasan.
sasanghomi is offline   Reply With Quote

Old   April 15, 2013, 12:45
Default
  #28
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 494
Rep Power: 9
mturcios777 is on a distinguished road
In the engineMesh solver output, the pistion position is output (pistonPosition= ) and is the z coordinate of the highest point of the piston patch. You can always start a run and wait for the message to be output and quit.

It is a little confusing of how the motion solver is specified. For the velocityLaplacian motionSolver in dynamicMeshDict, use "laplacian" as the motionSolver in engineGeometry.

The velocity profile is in the typical Foam table format. You first specify the number of entries and then the table of values. A sample profile can look like this:

Code:
4
(
(0 (0 0 0))
(1 (0 0 1))
(2 (0 0 2))
(3 (0 0 3))
)
Hope this helps!
mturcios777 is offline   Reply With Quote

Old   Today, 15:03
Default
  #29
Member
 
sasan
Join Date: Sep 2012
Posts: 98
Rep Power: 2
sasanghomi is on a distinguished road
Hi Marco,
A good day to you
I am trying to simulate an engine without changing topology. But I have some problems !
Please take a look at my case (I uploaded it https://mega.co.nz/#!VtIkxbiA!VNAilH...-p7-schAOzCJLw). Can you correct it?
I think some things in this case is wrong. I can't use pointMotionU as a Vectorfield and I don't know about motionSolver in engineGeometry ( it must be X or Y or Z . Why?)
Actually in this case piston doesn't move.
what is the type of boundary condition for valve in pointMotionU ? I want to set a profile for movement of valve.
Please help me.
I appreciate your help
Thanks and best regards,
Sasan.

P.S. I used coldEngineFoam as a solver.
sasanghomi is offline   Reply With Quote

Old   Today, 18:10
Default
  #30
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 494
Rep Power: 9
mturcios777 is on a distinguished road
Hi Sasan,

I would recommend using moveEngineMesh first to fully check the mesh motion. In your case, in engineGeometry, motionSolver should be "laplacian". In dynamicMeshDict, solver should be velocityLaplacian. To specify motion, the file in 0 directory should be pointMotionU and it should be a pointVectorField.

To specify valve motion you need to give the velocity profile (which is the derivative of the lift profile) and it must be specified as a vector (I noticed you are mixing having vectors and scalars in your boundary and initial conditions; they should all be vectors). Or you can switch the solver to displacementLaplacian in dynamicMeshDict (I've never had good experience with that one though, as the displacement has to be absolute I think).

You don't need to specify piston motion, as this is handled by how you have set your engine geometry settings in engineGeometry.

Hope this helps,
Marco
mturcios777 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
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 07:24
Native ParaView Reader Bugs tj22 OpenFOAM Paraview & paraFoam 261 June 26, 2012 16:24
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 06:25
Installation of Netgen in SuSE Linux 92 edvardsenpriv Open Source Meshers: Gmsh, Netgen, CGNS, ... 23 January 16, 2009 06:12
How to get the max value of the whole field waynezw0618 OpenFOAM Running, Solving & CFD 4 June 17, 2008 05:07


All times are GMT -4. The time now is 20:37.