CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Error while running a test case in modified interFoam (https://www.cfd-online.com/Forums/openfoam/237037-error-while-running-test-case-modified-interfoam.html)

sourav8016 June 27, 2021 11:56

Error while running a test case in modified interFoam
 
Hi Foamers,
I added an extra equation(sediment concentration equation) in interFoam and accordingly I have modified interFoam code. while running a test case the following error comes. Please help me out. Thanks in advance.

--> FOAM FATAL IO ERROR:
wrong token type - expected word, found on line 23 the doubleScalar 1e-06

file: /home/souravhossain/OpenFOAM/souravhossain-8/run/mySuspendedSedFoam/openChannel/constant/transportProperties/water/nu at line 23.

From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::word&)
in file primitives/strings/word/wordIO.C at line 74.

FOAM exiting

N.B. I'm using openfoam8.

HPE June 27, 2021 14:43

it seems that transportProperties/water/nu file should have some typo or a missing entry component. could you double check the file, and/or share the file?

sourav8016 June 27, 2021 15:18

Quote:

Originally Posted by HPE (Post 806970)
it seems that transportProperties/water/nu file should have some typo or a missing entry component. could you double check the file, and/or share the file?

Thanks for your kind reply. After modifying the transportProperties file, that error has gone
phases (water air);

water
{
transportModel Newtonian;
// nu 1e-06;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06; //previously I was not mentioning dimension.
rho 1000;
}

air
{
transportModel Newtonian;
nu 1.48e-05;
rho 1;
}

sigma 0.07;
But now I 'm getting another error :


-> FOAM FATAL ERROR:
LHS and RHS of + have different dimensions
dimensions : [0 0 0 0 0 0 0] + [0 2 0 0 0 0 0]


From function Foam::dimensionSet Foam::operator+(const Foam::dimensionSet&, const Foam::dimensionSet&)
in file dimensionSet/dimensionSet.C at line 501.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::operator+(Foam::dimensionSet const&, Foam::dimensionSet const&) at ??:?
#3 Foam::dimensioned<double> Foam::operator+<double>(Foam::dimensioned<double> const&, Foam::dimensioned<double> const&) at ??:?
#4 Foam::operator+(double, Foam::dimensioned<double> const&) at ??:?
#5 ? in "/home/souravhossain/OpenFOAM/souravhossain-8/platforms/linux64GccDPInt32Opt/bin/mySuspendedSedFoam"
#6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7 ? in "/home/souravhossain/OpenFOAM/souravhossain-8/platforms/linux64GccDPInt32Opt/bin/mySuspendedSedFoam"
Aborted (core dumped)

N.B. for further communication please inbox me at hossainsourav101@gmail.com through mail. I would be very happy to share my files. Thanks for your consideration.

HPE June 27, 2021 15:34

- The new error indicates that somewhere in your modification there is an inconsistency in dimensions in one of the operations. Possibly, you need to use a "dimensionedScalar" type instead of a "scalar" type in your new code. (pure speculation without seeing the code).
- I'm afraid, I prefer the public domain for any info exchange, so that other users could benefit from it wherever appropriate - because I do 100% non-paid volunteering here (also learning from others). Thanks for your understanding.

sourav8016 June 28, 2021 03:22

1 Attachment(s)
Quote:

Originally Posted by HPE (Post 806975)
- The new error indicates that somewhere in your modification there is an inconsistency in dimensions in one of the operations. Possibly, you need to use a "dimensionedScalar" type instead of a "scalar" type in your new code. (pure speculation without seeing the code).
- I'm afraid, I prefer the public domain for any info exchange, so that other users could benefit from it wherever appropriate - because I do 100% non-paid volunteering here (also learning from others). Thanks for your understanding.

Dear Sir, I was not aware of how to add files here. Now I am done. I have added two files
here. One file (https://www.dropbox.com/s/3dm2pet3ut...Added.pdf?dl=0) consists of my equations to be added in interFoam and other file(attached) consits of OpenFoam code. Please have a look. I am looking forward your valuable suggestion. Thanks in advance.

N.B. that dimensional error has now gone. Now another error came while running testcase:

--> FOAM FATAL ERROR:
Attempted assignment to a const reference to an object of type N4Foam14GeometricFieldIdNS_12fvPatchFieldENS_7volM eshEEE

From function void Foam::tmp<T>::operator=(const Foam::tmp<T>&) [with T = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>]
in file /opt/openfoam8/src/OpenFOAM/lnInclude/tmpI.H at line 379.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 ? in "/home/souravhossain/OpenFOAM/souravhossain-8/platforms/linux64GccDPInt32Opt/bin/mySuspendedSedFoam"
#3 ? in "/home/souravhossain/OpenFOAM/souravhossain-8/platforms/linux64GccDPInt32Opt/bin/mySuspendedSedFoam"
#4 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#5 ? in "/home/souravhossain/OpenFOAM/souravhossain-8/platforms/linux64GccDPInt32Opt/bin/mySuspendedSedFoam"
Aborted (core dumped)

HPE July 1, 2021 16:06

Attempted assignment to a const reference to an object of type


All times are GMT -4. The time now is 11:06.