CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   dieselEngineFoam/help please (http://www.cfd-online.com/Forums/openfoam/93677-dieselenginefoam-help-please.html)

riseguess October 23, 2011 14:04

dieselEngineFoam/help please
 
Hi foamers!
i am new to this community and need some assistance to start.
I have set up a case for dieselEngineFoam by combining dieselFoam and engineFoam. I am using mesh provided in kiva tutorial.
The case starts from -180 and crashes at -178.25 with following error messages
Please issue some advice

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................. | 0.0598462 mg
Evaporation Continuity Error... | 0.0598462 mg
ExecutionTime = 9.88 s ClockTime = 10 s

Courant Number mean: 0.0477459 max: 9.95485
Crank angle = -177.5 CA-deg
deltaZ = 5.43506e-06
clearance: 0.0856104
Piston speed = 0.195662 m/s
Solving chemistry
#0 Foam::error::printStack(Foam::Ostream&) in "/home/aliimran/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/home/aliimran/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in "/home/aliimran/OpenFOAM/OpenFOAM-2.0.x/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 "/home/aliimran/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/bin/dieselEngineFoam"
#5
in "/home/aliimran/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/bin/dieselEngineFoam"
#6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7
in "/home/aliimran/OpenFOAM/OpenFOAM-2.0.x/platforms/linux64GccDPOpt/bin/dieselEngineFoam"
Floating point exception

mturcios777 October 24, 2011 13:05

Read this article on the wiki for more information about debugging:

http://openfoamwiki.net/index.php/HowTo_debugging

In this case, the important lines are #1 and #3

#1 says you have a sigFpe, or a signal that there is a floating point error

#3 further states that this happened when the sqrt function wall called (square root) on some field. Since we don't have imaginary fluids in real life, this is clearly wrong.

Somewhere, there is a quantity in your field that is becoming negative, and the program crashes when it tries to take the square root of it. Take a look at the output time steps (write out more frequently if you need more) and see where this is happening. Then you will find your problem.

riseguess October 24, 2011 15:14

Dear mturcios777
Thank you very much for your immediate and kind response..
I have looked at my output again and have noticed that the values for injection pressure and injection velocity does not make sense.

Average Velocity for injector 0: 2.55467e+06 m/s, injection pressure = 2.32784e+10 bar

This may have led this error. I understand that injection pressure and injection velocity are not initialized by the user (unitInjector.C). These are rather calculated form mass flow rate profile specified. Currently, Mass flow rate is defined in terms of time (as I am using dieselFoam tutorial ) and I think, i have to convert it into crank angle. I trying to do that and see if it works.
By the way, this is how I am trying to convert massFlowRate form time into crank angle terms. R.P.M = 1500. so 1 degree=1/1500*360*60 sec... I am not sure if I shoud multiply the start ov injection crank angle value with this conversion factor. or in other words, what is the crank angle corresponding to t=0
Pardon my ignorance as these question may be very basic
Thanks again :)

Shahid

Thanks again for your prompt response though

mturcios777 October 24, 2011 15:21

If you are using dieselEngineFoam, you should be able to specify the injection profile based in crank angle and not seconds. If you have the profile in seconds, convert it to crank angle and see if that helps.

riseguess November 30, 2011 12:26

Injection profile in terms of crank angles
 
Thanks for your last reply.
I managed to fix that problem by adjusting the time step.
My simulation has run smoothly from -180 to -24 degree and then crashes:mad:. I think, i have not specified the injection law rightly. Can you guide me in this regard.? I think the left column in the injection law is the time and the right column is mass of fuel per Kg. If I am to use the same case, should I directly specify crank angles (-24, -23...0..+6) in the left column and the amount of fuel per crank angle in the right column (This is what I did but there was a FATAL Error: regarding it could not find the injection position at that point ). I know that at 1500 rpm, 1 sec = 9000 degree, should I get the time corresponding to -24 degree and then use it.
it may be fairly basic but it would help me a lot:)

Thanking in advance

Regards
shahid

mturcios777 November 30, 2011 15:35

The mass flow rate for dieselEngineFoam is specified as a series of times (expressed as crank angles) and mass flow rates (in kg/s). Not exactly consistent, there you go ;)

The error you are describing has to do with the location of the injector. Check its location and make sure that it is within the simulation domain at the time of injection. Because of moving meshes your injector may be outside the domain when its time to inject. Good luck!


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