|
[Sponsors] | |||||
Error dividing surfaceScalarFields using fvc::interpolate(volScalarField) |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
|
#1 |
|
Member
Fábio César Canesin
Join Date: Mar 2010
Location: Florianópolis
Posts: 67
Rep Power: 5 ![]() |
Hi all, I'm writing an modification of chtMultiRegionFoam and have been facing errors in calculation of diffusion-number as it follows:
Code:
Adding magnetic field Region: fluidflow Courant Number mean: 0.14898649 max: 0.3 #0 Foam::error::printStack(Foam::Ostream&) at ~/OpenFOAM/OpenFOAM-1.7.x/src/OSspecific/POSIX/printStack.C:202 #1 Foam::sigFpe::sigFpeHandler(int) at ~/OpenFOAM/OpenFOAM-1.7.x/src/OSspecific/POSIX/signals/sigFpe.C:127 #2 in "/lib/libc.so.6" #3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ~/OpenFOAM/OpenFOAM-1.7.x/src/OpenFOAM/fields/Fields/scalarField/scalarField.C:95 #4 void Foam::divide<Foam::fvsPatchField>(Foam::FieldField<Foam::fvsPatchField, double>&, Foam::FieldField<Foam::fvsPatchField, double> const&, Foam::FieldField<Foam::fvsPatchField, double> const&) at ~/OpenFOAM/OpenFOAM-1.7.x/src/OpenFOAM/lnInclude/scalarFieldField.C:89 #5 void Foam::divide<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ~/OpenFOAM/OpenFOAM-1.7.x/src/OpenFOAM/lnInclude/GeometricScalarField.C:114 #6 Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > Foam::operator/<Foam::fvsPatchField, Foam::surfaceMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&) at ~/OpenFOAM/OpenFOAM-1.7.x/src/OpenFOAM/lnInclude/GeometricScalarField.C:114 #7 at ~/OpenFOAM/canesin-1.7.x/solvers/amrIcoPolo/solid/solidRegionDiffNo.C:47 #8 at ~/OpenFOAM/canesin-1.7.x/solvers/amrIcoPolo/solid/solidRegionDiffusionNo.H:16 #9 __libc_start_main in "/lib/libc.so.6" #10 in "/home/canesin/OpenFOAM/canesin-1.7.x/applications/bin/linux64GccDPDebug/amrIcoPolo" Code:
#include "solidRegionDiffNo.H"
#include "fvc.H"
Foam::scalar Foam::solidRegionDiffNo
(
const fvMesh& mesh,
const Time& runTime,
const volScalarField& cp,
const volScalarField& rho,
const volScalarField& K
)
{
scalar DiNum = 0.0;
scalar meanDiNum = 0.0;
//- Can have fluid domains with 0 cells so do not test.
if (mesh.nInternalFaces())
{
surfaceScalarField KrhoCpbyDelta =
mesh.surfaceInterpolation::deltaCoeffs()
* fvc::interpolate(K)
/ (fvc::interpolate(cp) * fvc::interpolate(rho));
DiNum = max(KrhoCpbyDelta.internalField())*runTime.deltaT().value();
meanDiNum = (average(KrhoCpbyDelta)).value()*runTime.deltaT().value();
}
Info<< "Region: " << mesh.name() << " Diffusion Number mean: " << meanDiNum
<< " max: " << DiNum << endl;
return DiNum;
}
|
|
|
|
|
|
|
|
|
#2 |
|
Member
Fábio César Canesin
Join Date: Mar 2010
Location: Florianópolis
Posts: 67
Rep Power: 5 ![]() |
Hi all, sorry for the lame post!!!!
I have setup an unphysical boundary condition by mistake, had cp 0 them gat the floint point error... Sorry ! |
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SurfaceScalarFields | fabianpk | OpenFOAM | 6 | March 6, 2006 04:47 |