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

understanding explicit laplacian

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 26, 2020, 10:23
Default understanding explicit laplacian
  #1
New Member
 
Elol
Join Date: Feb 2020
Posts: 16
Rep Power: 6
Elol is on a distinguished road
Hello Foam experts,

I am calculating new volScalarField kl as follows;

Code:
const Time& runTime = mesh_.time();
volScalarField varible = fvc::laplacian(sumAlpha);
volScalarField::Internal varible2 = varible.ref();
scalarField varible3 = mesh_.V();
volScalarField::Internal varible4 = sumAlpha.ref();

 volScalarField kl =  ((alphaMax_ - sumAlpha) / runTime.deltaT().value()) / ( varible)     ;
where alplhaMax_ is scalar and sumAlpha is volScalarField.

to use it in the next transport equation;

Code:
 fvScalarMatrix alphatEqn
            (
                fvm::ddt(alphas_)
              - fvm::laplacian(kl , alphas_) 
            );

            alphatEqn.solve(mesh_.solver("alphatDiffusion"));
where alphas_ is volScalarField as well,

it is compiling perfectly however, when I run a case i have the following error
Code:
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/Elol/OpenFOAM/Elol-v1712/platforms/linux64GccDPInt32Opt/bin/multiphaseFoam"
#5  Foam::multiphaseDriftMixture::solveAlphas() at ??:?
#6  Foam::multiphaseDriftMixture::solve() at ??:?
#7  ? in "/home/Elol/OpenFOAM/Elol-v1712/platforms/linux64GccDPInt32Opt/bin/multiphaseFoam"
#8  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9  ? in "/home/Elol/OpenFOAM/Elol-v1712/platforms/linux64GccDPInt32Opt/bin/multiphaseFoam"
Floating point exception (core dumped)
I can not find why?

I think the problem some how is locating in the fvc::laplacian(sumAlpha) which I dont understand what the explicit laplacian generates.

anybody for help.

Elol
Elol is offline   Reply With Quote

Old   November 29, 2020, 15:54
Default
  #2
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
seem a division by zero. If you divide by something you have to be sure it's never zero. So instead doing A/B it is better doing A/(B + small). small is a field which small value and the correct dimension
mAlletto is offline   Reply With Quote

Old   November 30, 2020, 04:23
Default
  #3
New Member
 
Elol
Join Date: Feb 2020
Posts: 16
Rep Power: 6
Elol is on a distinguished road
Hi Michael,

Thanks, It worked.

Best Regards
Elol
Elol is offline   Reply With Quote

Old   November 30, 2020, 06:03
Default
  #4
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
For a good book regarding the numeric in OF see https://www.springer.com/de/book/9783319168739
mAlletto 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
Implicit vs Explicit Method Matteo991 Main CFD Forum 15 June 19, 2020 06:17
Why Laplacian is used instead of a combination of divergence and gradient operators? HakikiCanakkaleli OpenFOAM Programming & Development 3 September 26, 2019 07:40
Implicit and Explicit finite difference discretization of steady state heat conductio granzer Main CFD Forum 14 May 3, 2019 15:24
Laplacian containing an implicit and an explicit variable voingiappone OpenFOAM Programming & Development 0 July 1, 2013 02:40
Some questions about Laplacian with nonorthogonal correction koderer OpenFOAM 3 December 12, 2012 17:30


All times are GMT -4. The time now is 13:38.