|
[Sponsors] |
September 30, 2020, 09:37 |
Units in addSups fvOption
|
#1 |
New Member
Join Date: Jun 2020
Posts: 5
Rep Power: 6 |
Dear Foamers,
I am facing an issue with the source classes at the moment. It's probably just one little mistake I made or something I don't understand. Right now I am trying to write a class for battery heating. This is supposed to be used by the fvOptions dictionary. So far it works, but I am uncertain about the units, The following code is the one I am talking about. Code:
scalarField& heSource = eqn.source(); Info<<"eqn dimension "<<eqn.dimensions()<<nl; Info<<"heatFlow dimension "<<heatFlow.dimensions()<<nl; heSource-=heatSource; Code:
scalarField& heSource = eqn.source(); Info<<"eqn dimension "<<eqn.dimensions()<<nl; Info<<"heatFlow dimension "<<heatFlow.dimensions()<<nl; eqn-=heatSource; Code:
--> FOAM FATAL ERROR: [h[1 -1 -3 0 0 0 0] ] -= [heatFlow[1 2 -3 0 0 0 0] ] From function void Foam::checkMethod(const Foam::fvMatrix<Type>&, const Foam::DimensionedField<Type, Foam::volMesh>&, const char*) [with Type = double] in file /home/student-ift/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude/fvMatrix.C at line 1304. I couldn't find any answers to my question so far. I hope someone can help me out Kind regards, Frederik |
|
October 5, 2020, 06:05 |
|
#2 |
New Member
Join Date: Jun 2020
Posts: 5
Rep Power: 6 |
Is there no one with an idea regarding this? I tried to find the definition of source() in the fvMatrix code. But it seems like, this function is just returning the variable source_.
Code from fvMatrix.H: Code:
//- Source term Field<Type> source_; Code:
Field<Type>& source() { return source_; } const Field<Type>& source() const { return source_; } Unfortunately, I cannot find the definition of source_ or any hints regarding the dimension... I hope that someone came across this problem ealier |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fvOptions() Options and SemiImplicit Source Term - Units | Tobi | OpenFOAM Programming & Development | 11 | February 18, 2021 10:13 |
Thermophysical Property Units | johanz | OpenFOAM Pre-Processing | 2 | December 16, 2018 11:08 |
Writing XY plots with Non-SI units | Akhundzada91 | FLUENT | 0 | August 27, 2013 12:11 |
units in OpenFOAM | megacrout | OpenFOAM | 4 | July 19, 2011 09:04 |
Mass transfer units in fluent | nite_surfer | FLUENT | 0 | July 12, 2007 13:51 |