CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   3D engine simulation & error (http://www.cfd-online.com/Forums/openfoam/115313-3d-engine-simulation-error.html)

sasanghomi March 28, 2013 03:30

3D engine simulation & error
 
1 Attachment(s)
Dear foamers ,

I am simulating a 3D engine with sonicTurbDymEngineFoam and simpleEngineTopoFVmesh library....

I imported the mesh from GAMBIT to openfoam and when I run the case I have an error...
Code:

187531
187532
187533
187534
187535
187536
187537
187538
187539
187540
187541
187542
187543
187544
187545
187546
187547
187548
187549
187550
187551
187552
187553
187554
187555
187556
187557
187558
187559
187560
187561
187562
187563
187564
187565
187566
187567
187568
187569
187570
187571
187572
187573
187574
187575
187576
187577
187578
187579
187580
187581
187582
187583
187584
187585
187586
187587
187588
187589
187590
187591
187592
187593
187594
187595
187596
187597
187598
187599
187600
187601
187602
187603
187604
187605
187606
187607
187608
187609
187610
187611
187612
187613
187614
187615
187616
187617
187618
187619
187620
187621
187622
187623
187624
187625
187626
187627
187628
187629
187630
187631
187632
187633
187634
187635
187636
187637
187638
187639
187640
187641
187642
187643
187644
187645
187646
187647
187648
187649
187650
187651
187652
187653
187654
187655
187656
187657
187658
187659
187660
187661
187662
187663
187664
187665
187666
187667
187668
187669
187670
187671
187672
187673
187674
187675
187676
187677
187678
187679
187680
187681
187682
187683
187684
187685
187686
187687
187688
187689
187690
187691
187692
187693
187694
187695
187696
187697
187698
187699
187700
187701
187702
187703
187704
187705
187706
187707
187708
187709
187710
187711
187712
187713
187714
187715
187716
187717
187718
187719
187720
187721
187722
187723
187724
187725
187726
187727
187728
187729
187730
187731
187732
187733
187734
187735
187736
187737
187738
187739
187740
187741
187742
187743
187744
187745
187746
187747
187748
187749
187750
187751
187752
187753
187754
187755
187756
187757
187758
187759
187760
187761
187762
187763
187764
187765
187766
187767
187768
187769
187770
187771
187772
187773
187774
187775
187776
187777
187778
187779
187780
187781
187782
187783
187784
187785
187786
187787
187788
187789
187790
187791
187792
187793
187794
187795
187796
187797
187798
187799
187800
187801
187802
187803
187804
187805
187806
187807
187808
187809
187810
187811
187812
187813
187814
187815
187816
187817
187818
187819
187820
187821
187822
187823
187824
187825
187826
187827
187828
187829
187830
187831
187832
187833
187834
187835
187836
187837
187838
187839
187840
187841
187842
187843
187844
187845
187846
187847
187848
187849
187850
187851
187852
187853
187854
187855
187856
187857
187858
187859
187860
187861
187862
187863
187864
187865
187866
187867
187868
187869
187870
187871
187872
187873
187874
187875
187876
187877
187878
187879
187880
187881
187882
187883
187884
187885
187886
187887
187888
187889
187890
187891
187892
187893
187894
187895
187896
187897
187898
187899
187900
187901
187902
187903
187904
187905
187906
187907
187908
187909
187910
187911
187912
187913
187914
187915
187916
187917
187918
187919
187920
187921
187922
187923
187924
187925
187926
187927
187928
187929
187930
187931
187932
187933
187934
187935
187936
187937
187938
187939
187940
187941
187942
187943
187944
187945
187946
187947
187948
187949
187950
187951
187952
187953
187954
187955
187956
187957
187958
187959
187960
187961
187962
187963
187964
187965
187966
187967
187968
187969
187970
187971
187972
187973
187974
187975
187976
187977
187978
187979
187980
187981
187982
187983
187984
187985
187986
187987
187988
187989
187990
187991
187992
187993
187994
187995
187996
187997
187998
187999
188000
188001
188002
188003
188004
188005
188006
188007
188008
188009
188010
188011
188012
188013
188014
188015
188016
188017
188018
188019
188020
188021
188022
188023
188024
188025
188026
188027
188028
188029
188030
188031
)
 nInternalFaces: 175412

    From function void simpleEngineTopoFvMesh::addZonesAndModifiers()
    in file simpleEngineTopoFvMesh/addSimpleEngineTopoFvMeshModifiers.C at line 189.

FOAM aborting

Aborted (core dumped)

Can anyone help me?
How Can I overcome this problem?
I appreciate any help from you..

Thanks and best regards,
Sasan.

sasanghomi March 28, 2013 04:05

sometimes I have another error :

Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM Extend Project: Open source CFD        |
|  \\    /  O peration    | Version:  1.6-ext                              |
|  \\  /    A nd          | Web:      www.extend-project.de                |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 1.6-ext-959ec266ba5c
Exec  : sonicTurbDyMEngineFoam
Date  : Mar 28 2013
Time  : 12:32:12
Host  : sasan-Inspiron-N5110
PID    : 13906
Case  : /home/sasan/Desktop/3dcase
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create engine time

Create dynamic mesh for time = 0

Selecting dynamicFvMesh simpleEngineTopoFvMesh
Selecting motion solver: laplaceFaceDecomposition
Selecting motion diffusivity: uniform
void Foam::simpleEngineTopoFvMesh::addZonesAndModifiers() : Zones and modifiers already present.  Skipping.
Reading thermophysical properties

Selecting thermodynamics package hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>

Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type RASModel
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
    Cmu            0.09;
    C1              1.44;
    C2              1.92;
    C3              -0.33;
    sigmak          1;
    sigmaEps        1.3;
    Prt            1;
}

Creating field DpDt

Courant Number mean: 0 max: 0 velocity magnitude: 0
Total cylinder mass: 56825.7

Starting time loop

Courant Number mean: 0 max: 0 velocity magnitude: 0
deltaT = 2.6455e-06
Crank angle = 0.0238095 CA-deg
CG:  Solving for motionUx, Initial residual = 0, Final residual = 0, No Iterations 0
CG:  Solving for motionUy, Initial residual = 0, Final residual = 0, No Iterations 0
CG:  Solving for motionUz, Initial residual = 0.021432, Final residual = 2.02134e-05, No Iterations 15
CG:  Solving for motionUx, Initial residual = 1.00064e-11, Final residual = 1.00064e-11, No Iterations 0
CG:  Solving for motionUy, Initial residual = 0, Final residual = 0, No Iterations 0
CG:  Solving for motionUz, Initial residual = 2.75405e-06, Final residual = 1.88057e-09, No Iterations 21
Volume: new = 48556 old = 48555.7 change = 0.293155
Motion continuity errors : sum local = 1.46336e-10, maximum = 1.43825e-07
Floating point exception (core dumped)

please guide me...

Sasan.

calim_cfd March 28, 2013 15:17

hi!

since ur working with a mesh created outside OF i suggest u to test it at with a steady state or transient solver b4 running the dynamic mesh case.
moreover u might have to start the case with non-zero set of physical quantities... u might need the steadystate values at t=0s


That's all i can say for now!

sry i cant be of more help!:(
gl

novakm March 29, 2013 05:29

Hi Sasan.

I see a problem in the 2D area (the valve "seating" area) in the mesh.
I will try to generate the mesh with both valves down and after that I will move them to the position with using of simpleEngine and moveEngineMesh solver. You will after that have better control of the mesh.

And again, if you will have another troubles, you would post the case here and I will take a deeper look :)

sasanghomi March 29, 2013 07:04

@ mauricio :
Hi mauricio
thanks for your reply.
_______________________________________________

@ Martin
Hi Martin ,

thanks for your reply,
Actually I don't know anything about moveEngineMesh but I will try to do your idea and I will report the result..

Thanks and best regards,
Sasan.

novakm March 29, 2013 10:20

Quote:

Originally Posted by sasanghomi
@ [B
Martin[/B]
Hi Martin ,

thanks for your reply,
Actually I don't know anything about moveEngineMesh but I will try to do your idea and I will report the result..

Thanks and best regards,
Sasan.

moveEngineMesh is a simple utility, which contains just the mesh.move() command, so no volume fields are computed and this is the fastest way to handle the mesh (my opinion).

sasanghomi April 1, 2013 13:40

Hi Martin ,

I have an error for 3D simulation...
Code:

--> FOAM FATAL ERROR:
Cannot determine best atan point.  Doing face: 5(130 63594 99810 99740 325) position: 5((2.73987 2.75152e-15 -0.000249261) (2.76186 0.993863 -0.00025) (2.76426 0.993757 -0.000249261) (2.76426 0.993757 0) (2.73987 2.75152e-15 0)) Cur point: 65 position (2.73987 2.75152e-15 0) Next points: 2(0 704) position: 2((2.73987 2.75152e-15 -0.000249261) (2.76426 0.993757 0))

    From function void enrichedPatch::calcCutFaces() const
    in file polyMeshModifiers/slidingInterface/enrichedPatch/enrichedPatchCutFaces.C at line 277.

FOAM aborting

Aborted (core dumped)

I don't know any things about origin of this error....
For solving this problem I used mergeMeshes for creating interface and unfortunately I had this error again...
Do you think this error comes from engineGeometry or mesh generation??
please guide me..

Thanks and best regards,
Sasan.

sasanghomi April 6, 2013 04:27

Hi Martin ,

I increased the gap between valve and valve seat and I refined mesh in this region ( similar to 2D case) But unfortunately I have Motion continuity errors ...

Starting time loop Courant Number mean: 0 max: 0 velocity magnitude: 0 deltaT = 2.6455e-06 Crank angle = 0.0238095 CA-deg CG: Solving for motionUx, Initial residual = 0, Final residual = 0, No Iterations 0 CG: Solving for motionUy, Initial residual = 0, Final residual = 0, No Iterations 0 CG: Solving for motionUz, Initial residual = 0.213596, Final residual = 0.000179652, No Iterations 20 CG: Solving for motionUx, Initial residual = 4.89248e-09, Final residual = 4.42683e-10, No Iterations 1 CG: Solving for motionUy, Initial residual = 0, Final residual = 0, No Iterations 0 CG: Solving for motionUz, Initial residual = 0.000100573, Final residual = 7.10585e-08, No Iterations 21 Volume: new = 48492.4 old = 48492.3 change = 0.0719435 Motion continuity errors : sum local = 1.22866e-15, maximum = 2.88108e-14 Floating point exception (core dumped)

How can I overcome this error?
I need your help...
I appreciate any help from you..

Thanks and best regards,
Sasan.

mturcios777 April 8, 2013 13:01

I'm not sure that the problem is what you think it is. When you have motion continuity errors, that means that the continuity equations is not exactly obeyed due to the numerical discretization and schemes, which is normal. If you look at the magnitude of the errors (1e-14) they are very small so you are okay.

I'm not sure what the floating point error comes from, as there aren't any other error messages. My guess its something to do with your mesh definition. You can try turn on all the debug switches in the global controlDict that have to do with moving meshes and topoChangers and see if you get more information.

sasanghomi April 8, 2013 16:47

4 Attachment(s)
Dear Marco,

Thank you very much for your reply.;)
I added debug switches at the end of controlDict but unfortunately I didn't get more information.
I am tired of this error..:( I attached 4 pictures of the mesh..Do you think the mesh is good?Or not?
I tried to create a good mesh why the mesh create some problems:(

I appreciate any help from you.
Thanks and best regards,
Sasan.

mturcios777 April 8, 2013 17:57

Quote:

Originally Posted by sasanghomi (Post 417643)
Hi Martin ,

I have an error for 3D simulation...
Code:

--> FOAM FATAL ERROR:
Cannot determine best atan point.  Doing face: 5(130 63594 99810 99740 325) position: 5((2.73987 2.75152e-15 -0.000249261) (2.76186 0.993863 -0.00025) (2.76426 0.993757 -0.000249261) (2.76426 0.993757 0) (2.73987 2.75152e-15 0)) Cur point: 65 position (2.73987 2.75152e-15 0) Next points: 2(0 704) position: 2((2.73987 2.75152e-15 -0.000249261) (2.76426 0.993757 0))
 
    From function void enrichedPatch::calcCutFaces() const
    in file polyMeshModifiers/slidingInterface/enrichedPatch/enrichedPatchCutFaces.C at line 277.
 
FOAM aborting
 
Aborted (core dumped)

I don't know any things about origin of this error....
For solving this problem I used mergeMeshes for creating interface and unfortunately I had this error again...
Do you think this error comes from engineGeometry or mesh generation??
please guide me..

Thanks and best regards,
Sasan.

These errors are coming from the topology changer. Unfortunately they are one of the least documented parts of OpenFOAM (from an end users point of view). If you look at the error there is a problem with determining how much of the sliding interface is overlapping. We need someone with more experience with the sliding interface. Sadly I am not that person, but if you ever need help with attachDetach I can offer.

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.

sasanghomi April 8, 2013 18:26

1 Attachment(s)
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

mturcios777 April 8, 2013 18:36

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.

sasanghomi April 8, 2013 18:53

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?

mturcios777 April 8, 2013 19:23

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.

novakm April 9, 2013 03:57

Quote:

Originally Posted by sasanghomi (Post 419198)
Dear Marco,

Thank you very much for your reply.;)
I added debug switches at the end of controlDict but unfortunately I didn't get more information.
I am tired of this error..:( I attached 4 pictures of the mesh..Do you think the mesh is good?Or not?
I tried to create a good mesh why the mesh create some problems:(

I appreciate any help from you.
Thanks and best regards,
Sasan.

Hi Sasan.

Sorry for my late respond, but the world gets crazy these days.
Marco have post lot of useful information and I try to extend some of these ideas.

If you want debug messages you should compile OpenFoam in debug mode.
On the forum is there one thread, where the compilation is described ( admin is Bruno Santos).

As Marco have said, the motion continuity errors aren't the problem. The problem arises somewhere after the motion continuity errors are written on the screen. You should look into the code (try to use eclipse).

Do you have tried stitchmesh for the ports any cyls of the valve curtain?

Antoher possible problem for LayerAR I see in the poppet patch of the valves
As I have found in second chapter of this thesis (page 23)

http://www.tfd.chalmers.se/~hani/pdf...sterThesis.pdf

The layer addition and removal is carried out according to the following algorithm. Two
cell layers are defined, one static and one dynamic. These must have the same structure.
The neighbouring faces of two layers must be normal to each other. The dashed line in
Figure 2.14 shows such a set of faces. This requires a hexahedral mesh in the layering
region.


If the stitchMesh will work normally, you might try to set the deformAngle to 180 in order to get the mesh deformation. If the error remain the same, you should look at the boundary conditions.

Again, it will be better, if you post the case somewhere and here place the link.

Best regards

Martin

sasanghomi April 9, 2013 05:11

Hi Martin ,

I am very glad for returning you.
thanks for your reply.
Can I have your email for sending the case?

best regards,
Sasan

sasanghomi April 9, 2013 05:21

Quote:

Originally Posted by mturcios777 (Post 419241)
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.

Thank you very much Marco ..I will try to do it..
I appreciate your help.
Thanks and best regards,
Sasan.

novakm April 9, 2013 05:59

Quote:

Originally Posted by sasanghomi (Post 419350)
Hi Martin ,

I am very glad for returning you.
thanks for your reply.
Can I have your email for sending the case?

best regards,
Sasan



sure, here it is: novakm@karlin.mff.cuni.cz

But I think that posting the case here will be better.
more eyes see more...

M

sasanghomi April 11, 2013 14:54

Hi Dear Marco,

a good day to you.
I am trying to use fvMotionsolver for engineMesh (as you were advised) but I need your help.
How can I define a profile for piston or valves in the pointMotionUx file?
I think I should use of equations in the refrence books of internal combustion engines for speed of piston .But for valves I have valvelift versus CAD (a lot of points (CAD & valvelift) I don't have a function) ..
How can I set this boundary conditions for valves and piston? ( in pointMotionUx file )
My second question is about geometry . can you explain about static geometry? should I change the geometry? how can I close the exhaust valve at the begining of time ? and how can I close the inlet valve at the exhaust stroke ? you said I must use a script but I don't know anythings about that.

I appreciate any help from you,
Thanks and best regards,
Sasan.


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