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

Having problems with implementing mesh motion

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 13, 2017, 04:20
Default Having problems with implementing mesh motion
  #1
New Member
 
Qiyan Zhou
Join Date: Sep 2016
Posts: 16
Rep Power: 9
zhouqy1994 is on a distinguished road
hi

i have this problem too....have you found the solution?

Quote:
Originally Posted by dipling View Post
Hello,

it's me again I teste the "bt" command in gdb after the segmentation fault:

Code:
#0  0xb804d430 in __kernel_vsyscall ()
#1  0xb61b36d0 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb61b5098 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb6648458 in Foam::error::abort (this=0xb69cf620) at lnInclude/error.C:243
#4  0x08087d58 in Foam::operator<< <Foam::error> (os=@0x89be5d8, m={fPtr_ = 0xb664815a <Foam::error::abort()>, err_ = @0xb69cf620})
    at /home/cfd/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/errorManip.H:86
#5  0x08096597 in Foam::UList<double>::checkIndex (this=0x8b3528c, i=1) at /home/cfd/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/UListI.H:111
#6  0x080965c2 in Foam::UList<double>::operator[] (this=0x8b3528c, i=1) at /home/cfd/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/UListI.H:136
#7  0xb73df753 in Foam::volPointInterpolation::interpolateInternalField<Foam::Vector<double> > (this=0xbfb6955c, vf=@0xbfb687d0, pf=@0x8b0c6e8)
    at lnInclude/volPointInterpolate.C:67
#8  0xb73e9caa in Foam::volPointInterpolation::interpolate<Foam::Vector<double> > (this=0xbfb6955c, vf=@0xbfb687d0) at lnInclude/volPointInterpolate.C:184
#9  0xb7404129 in interpolationCellPointFace (this=0x8a507a0, pInterp=@0xbfb6955c, psi=@0xbfb687d0)
    at interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.C:53
#10 0xb740425d in Foam::interpolation<Foam::Vector<double> >::adddictionaryConstructorToTable<Foam::interpolationCellPointFace<Foam::Vector<double> > >::New (
    pInterp=@0xbfb6955c, psi=@0xbfb687d0) at lnInclude/interpolation.H:80
#11 0xb6c4db56 in Foam::interpolation<Foam::Vector<double> >::New (interpolationType=@0xbfb674d8, pInterp=@0xbfb6955c, psi=@0xbfb687d0)
    at /home/cfd/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude/newInterpolation.C:58
#12 0xb6c4dbcf in Foam::interpolation<Foam::Vector<double> >::New (interpolationSchemes=@0xbfb67f4c, pInterp=@0xbfb6955c, psi=@0xbfb687d0)
    at /home/cfd/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude/newInterpolation.C:71
#13 0xb6c46b5f in Foam::spray::evolve (this=0xbfb67c58) at spray/sprayOps.C:57
#14 0x080811d6 in main (argc=Cannot access memory at address 0x528c
Can anybody extract some information where he gets i=1 ?The reason why Foam is crashing is listet below..


The orginally error is now:

index 1 out of range 0 ... 0

From function UList<T>::checkIndex(const label)
in file /home/cfd/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/UListI.H at line 111.

FOAM aborting
i know this thread is really old...but i have exact the same problem...thanks in advance if you can reply

Last edited by wyldckat; April 25, 2017 at 08:37. Reason: posted a few minutes apart
zhouqy1994 is offline   Reply With Quote

Old   April 14, 2017, 10:30
Default
  #2
New Member
 
Qiyan Zhou
Join Date: Sep 2016
Posts: 16
Rep Power: 9
zhouqy1994 is on a distinguished road
Quote:
Originally Posted by Abhishekd18 View Post
Ok. I will do that.

What should I do after that?

What kind of code do I have to write?

And few more questions
1. When I modified dieselEngineFoam for layering, I did it as it is done in sonicTurbDyMFoam. But the solution diverges when layering starts. When I commented the statement "# include compressibleCorrectPhi.H" it runs perfectly fine. As far as I understood, compressibleCorrectPhi.H solves pressure correction after mesh change and it should be included.

2. While running in parallel, the solution crashed at the start of injection. When I started debugging the code, it turned out to be some problem with the statement "# include findInjectorCell.H" in sprayInject.C. Again on commenting the line, the solver runs and I can see the spary injected from the desired location.

What could be the reasons?
hi
have you found any solution? i have the same problem when run the case in parallel, however, it works fine in serial.
after debugging the code, i found there may be some problems with "findInjectorCell.H", in which there is a function "reduce()"
can you give me some help...i have stumbled here for a long time
thanks in advance
zhouqy1994 is offline   Reply With Quote

Old   April 16, 2017, 23:34
Default
  #3
New Member
 
Qiyan Zhou
Join Date: Sep 2016
Posts: 16
Rep Power: 9
zhouqy1994 is on a distinguished road
Quote:
Originally Posted by lucasal View Post
Hi Marco,

I am currently running a simulation with sprayEngineFoam by using a simple box as engine mesh with layered addition removal as described by you here.

At the moment, I am simulating only compression/expansion, starting from -180°CA (BDC) to +180°CA (next BDC).

What I noticed is that temperature and pressure are not specular respect to TDC, e.g. at -50°CA during compression temperature(640K) and pressure are substantially higher than at +50°CA during expansion (T=285K!!).
From theory they should be the same, since neither combustion nor fuel injection occur.

The thermophysicalProperties used are:

Code:
thermoType
{
    type            hePsiThermo;
    mixture         reactingMixture;
    transport       sutherland;
    thermo          janaf;
    energy          sensibleEnthalpy;
    equationOfState perfectGas;
    specie          specie;
}
And the fvSolution file is the following:

Code:
solvers
{
    rho
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-07;
        relTol          0.1;
    }

    rhoFinal
    {
        $rho;
        tolerance       1e-07;
        relTol          0;
    }

    "(U|k|epsilon)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-07;
        relTol          0.1;
    }

    p
    {
        solver          GAMG;
        tolerance       1e-07;
        relTol          0.1;
        smoother        GaussSeidel;
        nPreSweeps      0;
        nPostSweeps     2;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator    faceAreaPair;
        mergeLevels     1;

    }

    pFinal
    {
        $p;
        tolerance       1e-07;
        relTol          0;
    }

    "(U|k|epsilon)Final"
    {
        $U;
        tolerance       1e-07;
        relTol          0;
    }

    "(Yi|O2|N2|H2O)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-7;
        relTol          0;
    }

    h
    {
        $Yi;
        relTol          0.01;
    }
    hFinal
    {
        $Yi;
    }
}

PIMPLE
{
    transonic       no;
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
    momentumPredictor yes;
}

relaxationFactors
{
    fields
    {
        ".*Final"       1;
    }
    equations
    {
        ".*Final"       1;
    }
}

Have you noticed these P and T behaviours with layered A/R and engineMesh motion?
I was wondering if there could be an issue in the meshPhi flux that is not correctly computed expecially when new cells are added during expansion.

Thank you very much for any advice.

Regards,

Luca
hi

have you solved the problem now? i come across the same issue...

i found that if i didnot consider the meshPhi, just change the mesh.move() to mesh.update(), and do a little change in Make files, the temperature and pressure field seem to be ok...but it brings me some issue at the beginning of injection when i try to run parallel..

however, after i make a big change to the solver(refer to sonicTurbDyMEngineFoam to do some computation of meshPhi), the weird temperature and pressure field occur...

i wonder may be there is something wrong when compute the meshPhi....

can you give me some tips?

thanks in advance

Last edited by wyldckat; April 25, 2017 at 08:57. Reason: Added [CODE][/CODE] markers
zhouqy1994 is offline   Reply With Quote

Old   April 25, 2017, 09:03
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings zhouqy1994,

I've moved your three posts above to a single thread, to make it easier to help, also because those threads are somewhat old now and the probability seemed low of someone from those threads answering to your posts.

Regarding your questions, it's really hard to determine what's going on wrong with your experiments, without having the ability to see what you are doing exactly. Furthermore, knowing which OpenFOAM or foam-extend version or fork that you are using would make it easier to diagnose if the problem was related to the version itself, namely if it was fixed in newer versions or not.

Please read the following thread for more details: How to give enough info to get help

Because from the first post, my guess is that the mesh is being incorrectly manipulated, for example, a cell might be being collapsed too much, resulting in the crash. See for example the study done and reported in the following thread: https://www.cfd-online.com/Forums/op...ilitities.html

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   May 6, 2017, 04:15
Default
  #5
New Member
 
Qiyan Zhou
Join Date: Sep 2016
Posts: 16
Rep Power: 9
zhouqy1994 is on a distinguished road
thank you Bruno

Problem has been solved although i still don't know what causes the problem

Besides i use foam-extend 4.0 to simulate engine spray and combustion by modifing dieselEngineFoam, more specific, combine dieselEngineFoam with sonicTurbEngineFoam to realize the layer addition and removal during the mesh motion process

Thank you very much


Sent from my iPhone using CFD Online Forum mobile app
zhouqy1994 is offline   Reply With Quote

Old   May 17, 2017, 10:36
Default
  #6
New Member
 
raju ram bhakar
Join Date: May 2017
Posts: 11
Rep Power: 8
bhakar.raju98 is on a distinguished road
Hello zhou,

I'm facing problem in converting .stl file to .ftr format using surfaceConvert 2.stl 2.ftr
Reason for conversion : refineImmersedBoundaryMesh need .ftr file to refine the mesh.(If you can tell me a way where I don't need the ftr file that will also do)


At the time of compiling the fe40 for every other utility the results were shown as name_of_the_library is up to date
but for only surfaceConvert I got this message

Quote:
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-200 -I/home/environ/foam/foam-extend-4.0/src/meshTools/lnInclude -IlnInclude -I. -I/home/environ/foam/foam-extend-4.0/src/foam/lnInclude -I/home/environ/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/surfaceConvert.o -L/home/environ/foam/foam-extend-4.0/lib/linux64GccDPOpt \
-lmeshTools -lfoam -ldl -lrt -lm -o /home/environ/foam/foam-extend-4.0/applications/bin/linux64GccDPOpt/surfaceConvert
bhakar.raju98 is offline   Reply With Quote

Old   May 19, 2017, 08:56
Default
  #7
New Member
 
Qiyan Zhou
Join Date: Sep 2016
Posts: 16
Rep Power: 9
zhouqy1994 is on a distinguished road
Hi bhakar
I am really sorry...I don't familiar with that...my mesh was generated by ICEM,and the dynamic mesh was related to layeraddutionalandremoval...neither of them is related to you problem...I feel sorry for that...


Sent from my iPhone using CFD Online Forum mobile app
zhouqy1994 is offline   Reply With Quote

Old   May 19, 2017, 09:15
Default
  #8
New Member
 
raju ram bhakar
Join Date: May 2017
Posts: 11
Rep Power: 8
bhakar.raju98 is on a distinguished road
Hello zhou,

Thanks for your reply.
I had solved the problem on my own.
I installed openFoam4.1 and converted the files using OF41 and used them in FE40 and it worked.
bhakar.raju98 is offline   Reply With Quote

Old   May 19, 2017, 09:45
Default
  #9
New Member
 
Qiyan Zhou
Join Date: Sep 2016
Posts: 16
Rep Power: 9
zhouqy1994 is on a distinguished road
Ok .congrats


Sent from my iPhone using CFD Online Forum mobile app
zhouqy1994 is offline   Reply With Quote

Reply


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
Multi subset mesh motion hchen OpenFOAM Running, Solving & CFD 3 March 5, 2022 23:41
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
Update of the variables after dynamic mesh motion. gtg258f OpenFOAM Programming & Development 9 January 18, 2014 10:08
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 09:38


All times are GMT -4. The time now is 11:39.