|
[Sponsors] |
|
April 13, 2013, 13:50 |
|
#1 |
Senior Member
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 14 |
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; // ************************************************************************* // 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. |
|
April 15, 2013, 12:45 |
|
#2 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
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)) ) |
|
May 13, 2013, 15:03 |
|
#3 |
Senior Member
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 14 |
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. |
|
May 13, 2013, 18:10 |
|
#4 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
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 |
|
May 14, 2013, 04:48 |
|
#5 | |
New Member
RJ HO
Join Date: Dec 2012
Posts: 21
Rep Power: 13 |
Quote:
Marco, I wonder if you are willing to share your case setup folder using fvMotionSolverEngineMesh? I'm doing something almost similar to sasan. I manage to work my case with sprayEngineFoam with OpenFoam2.2.x. Now, I would like to include intake and exhaust simulation but I have completely no idea where to start with fvMotionSolverEngineMesh. My email is rj_5847@hotmail.com. Regards RJ |
||
May 14, 2013, 11:37 |
|
#6 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Sasan's is a good place to start, with the corrections I have suggested. I can't share any cases as it is work for my employer.
|
|
May 14, 2013, 14:04 |
|
#7 |
Senior Member
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 14 |
@RJ HO : That's ok . I am trying to create a test case with fvMotionSolver.
@Mrco : Thank you very much Marco for your guidance . Actually I changed the case according to your advice. ( I uploaded ithttps://mega.co.nz/#!QhZUQKbY!T_jZej...0-anJa9pbED4tI ) when I run the case I have an error : Code:
--> FOAM FATAL IO ERROR: cannot open file file: /home/sasan/Desktop/engine-cold/0/pointMotionUlaplacian at line 0. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 62. FOAM exiting Code:
--> FOAM FATAL IO ERROR: unexpected class name pointVectorField expected pointScalarField while reading object pointMotionUlaplacian file: /home/sasan/Desktop/engine-cold/0/pointMotionUlaplacian at line 14. From function regIOobject::readStream(const word&) in file db/regIOobject/regIOobjectRead.C at line 110. FOAM exiting please correct me if I am wrong . Also I don't know for sure about type of this boundary condition . It should be Time varying ? Can you write an example of this boundary condition here? I appreciate your help, Thanks and best regards, Sasan. |
|
May 14, 2013, 14:31 |
|
#8 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Hi Sasan,
I don't have a copy of 1.6-ext running on my machine so it may be that pointMotionU should be a pointScalarField. I don't remember which type of boundary condition pointScalarFields take, but it should be something like Code:
valve { type timeVaryingUniformValue; //time varying boundary condition outOfBounds clamp; //what to do when the end of the list is reached, clamp uses keeps using the last value (since we end with zero velocity, this is what we want) fileName "valve.txt" //create a file that contains the table with the velocity profile; the filepath is relative to the current case folder, so just put it there. I've attached it for you } |
|
June 17, 2014, 22:45 |
|
#9 |
New Member
Join Date: Mar 2013
Posts: 24
Rep Power: 13 |
I am using foam-extend-3.0 and want to simulate 3D engine. I choose verticalValves in engineTopoChangerMesh for mesh topo change. but there are many cellzones and pointzones such as
valveTopPointsV1 valveBottomPointsV1 movingCellsTopV1 movingCellsBotV1 I don't know how to define. can anyone give me a hand? |
|
April 8, 2013, 17:57 |
|
#10 | |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Quote:
Some advice I can offer is to look at the code in enrichedPatchCutFaces.C and see what condition is being violated when that error message is thrown. My copy of enrichedPatch doesn't have that line, but I am running 2.2.x. I think your mesh is fine for stationary simulation, but when involving the topology modifiers things get very complicated very fast. Why don't you simulate with a simpler engine mesh class (fvMotionSolverEngineMesh) and simulate the valve closing until your timestep falls below a certain value, then remeshing without the valve passages (closing off the domain) until you need to move them again? I've seen many people do this as the topology modifiers can be a bit of a pain to get working. |
||
April 8, 2013, 18:26 |
|
#11 |
Senior Member
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 14 |
thanks for your reply marco ,
I attached enrichedPatchCutFaces.C I have not worked with fvMotionSolverEngineMesh...is there in version 1.6-ext? what are things that I must change for using this library in my case? only enginGeometry? Can you set here an engineGeometry file for using this library? Thanks and best regards, Sasan |
|
April 8, 2013, 18:36 |
|
#12 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Thanks Sasan. From a quick read it seems like the problem is that the sliding face isn't planar, though I can't be 100%; it may be possible this engineMesh only works in 2D and requires the sliding interface to be planar.
fvMotionSolverEngineMesh requires a dynamicMeshDict to specify the type of motionSolver you are using (have a look at the pimpleDyMFoam tutorial case movingCone), and you will need a pointMotionU file in the initial time directory that give the velocity profile of the valve motion for the valve boundaries. |
|
April 8, 2013, 18:53 |
|
#13 |
Senior Member
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 14 |
your mean is that I must change my solver? or only dynamicFvMesh ??
which solver?which version? and this class doesn't have sliding interface? am I right? only layering? and for attach/detach for valves it remesh the grid? |
|
April 8, 2013, 19:23 |
|
#14 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
As long as your solver uses engineMesh (so engineFoam or dieselEngineFoam) you will be fine. The dynamicMeshDict specifies what motionSolver you want to use (how to solve for the point motion equation and what the diffusivity of the points of the mesh should be).
These classes don't have ANY topology change at all. This will require you to remesh whenever the mesh quality gets very poor or when you want to change the topology (open/close valves, etc). You can write a script to remesh when your simulation crashes, as poor mesh will likely cause that to happen. |
|
April 9, 2013, 05:21 |
|
#15 | |
Senior Member
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 14 |
Quote:
I appreciate your help. Thanks and best regards, Sasan. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Native ParaView Reader Bugs | tj22 | ParaView | 270 | January 4, 2016 11:39 |
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) | Yogini | Fluent UDF and Scheme Programming | 7 | October 3, 2012 07:24 |
CGNS lib and Fortran compiler | manaliac | Main CFD Forum | 2 | November 29, 2010 06:25 |
[Netgen] Installation of Netgen in SuSE Linux 92 | edvardsenpriv | OpenFOAM Meshing & Mesh Conversion | 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 |