|
[Sponsors] |
November 26, 2020, 10:23 |
understanding explicit laplacian
|
#1 |
New Member
Elol
Join Date: Feb 2020
Posts: 16
Rep Power: 6 |
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) ; to use it in the next transport equation; Code:
fvScalarMatrix alphatEqn ( fvm::ddt(alphas_) - fvm::laplacian(kl , alphas_) ); alphatEqn.solve(mesh_.solver("alphatDiffusion")); 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 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 |
|
November 29, 2020, 15:54 |
|
#2 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15 |
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
|
|
November 30, 2020, 04:23 |
|
#3 |
New Member
Elol
Join Date: Feb 2020
Posts: 16
Rep Power: 6 |
Hi Michael,
Thanks, It worked. Best Regards Elol |
|
November 30, 2020, 06:03 |
|
#4 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15 |
For a good book regarding the numeric in OF see https://www.springer.com/de/book/9783319168739
|
|
|
|
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 |