AMReX-Combustion / PeleLM

An adaptive mesh hydrodynamics simulation code for low Mach number reacting flows
https://amrex-combustion.github.io/PeleLM/
Other
83 stars 41 forks source link

Inflow, Outflow, NoSlipWallIsotherm #224

Open czc-zju opened 2 years ago

czc-zju commented 2 years ago

_peleLM.lo_bc = Inflow NoSlipWallIsotherm peleLM.hi_bc = Outflow NoSlipWallIsotherm_ the above is my boundary settings, when starting the computation, I always get the error:

image

drummerdoc commented 2 years ago

Can you build a re-run with DEBUG=TRUE (either at the make cmd line or in the GNUmakefile), or follow the info at the top of the Backtrace to fill out the backtrace.

czc-zju commented 2 years ago

When I run _PeleLM2d.gnu.DEBUG.MPI.ex inputs.2d_, I also get the same error: _Erroneous arithmetic operation Erroneous arithmetic operation See Backtrace.1 file for details See Backtrace.0 file for details Abort(8) on node 1 (rank 1 in comm 0): application called MPI_Abort(MPI_COMMWORLD, 8) - process 1

esclapez commented 2 years ago

Is the Backtrace containing more information? Activating the Debug should enable narrowing down the problem.

czc-zju commented 2 years ago

Backtrace: 0: ./PeleLM2d.gnu.DEBUG.ex(+0xea5c2e) [0x5608c6982c2e] amrex::BLBackTrace::print_backtrace_info(_IO_FILE) at /home/ubuntu/PeleLM/Submodules/amrex/Src/Base/AMReX_BLBackTrace.cpp:175 1: ./PeleLM2d.gnu.DEBUG.ex(+0xea572e) [0x5608c698272e] amrex::BLBackTrace::handler(int) at /home/ubuntu/PeleLM/Submodules/amrex/Src/Base/AMReX_BLBackTrace.cpp:85 2: /lib/x86_64-linux-gnu/libc.so.6(+0x3ef10) [0x7f5db41eff10] 3: /lib/x86_64-linux-gnu/libm.so.6(logf32x+0x30) [0x7f5db49e7ad0] ?? ??:0 4: ./PeleLM2d.gnu.DEBUG.ex(+0x4c2f83) [0x5608c5f9ff83] PeleLM::calcDiffusivity(double)::{lambda(int, int, int)#2}::operator()(int, int, int) const at /home/ubuntu/PeleLM/Submodules/PelePhysics/Transport/Simple.H:292 (inlined by) getTransportCoeff(int, int, int, amrex::Array4 const&, amrex::Array4 const&, amrex::Array4 const&, amrex::Array4 const&, amrex::Array4 const&, pele::physics::transport::TransParm<pele::physics::eos::Fuego, pele::physics::transport::SimpleTransport> const) at /home/ubuntu/PeleLM/Source/PeleLM_K.H:444 (inlined by) operator() at /home/ubuntu/PeleLM/Source/PeleLM.cpp:8001 5: ./PeleLM2d.gnu.DEBUG.ex(+0x4fbc7d) [0x5608c5fd8c7d] decltype ({parm#1}(0, 0, 0)) amrex::detail::call_f<PeleLM::calcDiffusivity(double)::{lambda(int, int, int)#2}>(PeleLM::calcDiffusivity(double)::{lambda(int, int, int)#2} const&, int, int, int) at /home/ubuntu/PeleLM/Submodules/amrex/Src/Base/AMReX_GpuLaunchFunctsC.H:30 6: ./PeleLM2d.gnu.DEBUG.ex(+0x4f76b8) [0x5608c5fd46b8] void amrex::ParallelFor<PeleLM::calcDiffusivity(double)::{lambda(int, int, int)#2}>(amrex::Box const&, PeleLM::calcDiffusivity(double)::{lambda(int, int, int)#2}&&) at /home/ubuntu/PeleLM/Submodules/amrex/Src/Base/AMReX_GpuLaunchFunctsC.H:118 (discriminator 2) 7: ./PeleLM2d.gnu.DEBUG.ex(+0x4c6dff) [0x5608c5fa3dff] PeleLM::calcDiffusivity(double) at /home/ubuntu/PeleLM/Source/PeleLM.cpp:7980 (discriminator 3) 8: ./PeleLM2d.gnu.DEBUG.ex(+0x43ad13) [0x5608c5f17d13] PeleLM::initData() at /home/ubuntu/PeleLM/Source/PeleLM.cpp:2103 9: ./PeleLM2d.gnu.DEBUG.ex(+0xfa0974) [0x5608c6a7d974] amrex::Amr::defBaseLevel(double, amrex::BoxArray const, amrex::Vector<int, std::allocator > const) at /home/ubuntu/PeleLM/Submodules/amrex/Src/Amr/AMReX_Amr.cpp:2506

_10: ./PeleLM2d.gnu.DEBUG.ex(+0xf9a36f) [0x5608c6a7736f] amrex::Amr::InitializeInit(double, double, amrex::BoxArray const, amrex::Vector<int, std::allocator > const) at /home/ubuntu/PeleLM/Submodules/amrex/Src/Amr/AMReX_Amr.cpp:1308 11: ./PeleLM2d.gnu.DEBUG.ex(+0xf9a288) [0x5608c6a77288] amrex::Amr::initialInit(double, double, amrex::BoxArray const, amrex::Vector<int, std::allocator > const) at /home/ubuntu/PeleLM/Submodules/amrex/Src/Amr/AMReX_Amr.cpp:1275 12: ./PeleLM2d.gnu.DEBUG.ex(+0xf99bc7) [0x5608c6a76bc7] amrex::Amr::init(double, double) at /home/ubuntu/PeleLM/Submodules/amrex/Src/Amr/AMReX_Amr.cpp:1144 13: ./PeleLM2d.gnu.DEBUG.ex(+0x621ab0) [0x5608c60feab0] main at /home/ubuntu/PeleLM/Submodules/IAMR/Source/main.cpp:96 14: /lib/x86_64-linux-gnu/libc.so.6(__libc_startmain+0xe7) [0x7f5db41d2c87] 15: ./PeleLM2d.gnu.DEBUG.ex(+0x1ad6a) [0x5608c5af7d6a] ?? ??:0

drummerdoc commented 2 years ago

You can see here which line triggers the abort: PeleLM::calcDiffusivity(double)::{lambda(int, int, int)https://github.com/AMReX-Combustion/PeleLM/pull/2}::operator()(int, int, int) const at /home/ubuntu/PeleLM/Submodules/PelePhysics/Transport/Simple.H:292

which is:

logT[0] = std::log(Tloc);

Suggesting that the temperature is non-positive. This is called just after the state is initialized, so it seems as though your initial data is incorrectly setting a non-positive temperature. Can you guess maybe how that might have happened? The next step would be to find the cell where this is happening and look deeper into why the temperature has a bad value (perhaps uninitialized?).

czc-zju commented 2 years ago

My case file is EB_FlamePastCylinder (_PeleLM/Exec/RegTests/EBFlamePastCylinder), and I change the boundary from Interior to NoSlipWallIsotherm, the others remain the same. I am asking for your help to diagnose the issue.  Thanks in advance for your time.

esclapez commented 2 years ago

By changing the transverse boundaries from Interior to NoSlipWallIsotherm, the temperature y-boundaries changed to Dirichlet and need to be specified. All Dirichlet boundaries are specified in the bcnormal function of pelelm_prob.H, and without changing the current implementation, the temperature in the y+ is unspecified. Two arguments of that function allow you to identify the boundary on which it is called: idir can be either 0, 1 or 2 for X, Y or Z, respectively; sgn indicates the boundary normal direction, +1 and -1 for the low and high boundary, respectively. Using these, you should be able to specify the temperature by filling s_ext[DEF_Temp] in the y-direction.

czc-zju commented 2 years ago

YES, IT WORKS. Thanks a lot dear esclapez and drummerdoc for your reply. I have another question, can the boundary of EB be set to NoSlipWallIsotherm? Thanks again.