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

Error while running a test case in modified interFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By HPE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 27, 2021, 11:56
Default Error while running a test case in modified interFoam
  #1
New Member
 
Sourav Hossain
Join Date: Mar 2019
Posts: 25
Rep Power: 7
sourav8016 is on a distinguished road
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:perator>>(Foam::Istream&, Foam::word&)
in file primitives/strings/word/wordIO.C at line 74.

FOAM exiting

N.B. I'm using openfoam8.
sourav8016 is offline   Reply With Quote

Old   June 27, 2021, 14:43
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
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?
HPE is offline   Reply With Quote

Old   June 27, 2021, 15:18
Default
  #3
New Member
 
Sourav Hossain
Join Date: Mar 2019
Posts: 25
Rep Power: 7
sourav8016 is on a distinguished road
Quote:
Originally Posted by HPE View Post
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:perator+(const Foam::dimensionSet&, const Foam::dimensionSet&)
in file dimensionSet/dimensionSet.C at line 501.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam:perator+(Foam::dimensionSet const&, Foam::dimensionSet const&) at ??:?
#3 Foam::dimensioned<double> Foam:perator+<double>(Foam::dimensioned<double> const&, Foam::dimensioned<double> const&) at ??:?
#4 Foam:perator+(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.
sourav8016 is offline   Reply With Quote

Old   June 27, 2021, 15:34
Default
  #4
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
- 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 likes this.
HPE is offline   Reply With Quote

Old   June 28, 2021, 03:22
Default
  #5
New Member
 
Sourav Hossain
Join Date: Mar 2019
Posts: 25
Rep Power: 7
sourav8016 is on a distinguished road
Quote:
Originally Posted by HPE View Post
- 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>:perator=(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:rintStack(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)
Attached Files
File Type: zip modifiedEquationsCode.zip (3.9 KB, 1 views)
sourav8016 is offline   Reply With Quote

Old   July 1, 2021, 16:06
Default
  #6
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Attempted assignment to a const reference to an object of type
HPE 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
2D flow around a circular cylinder case with interFoam solver shuoxue OpenFOAM Running, Solving & CFD 2 January 14, 2020 13:23
[Other] Running test case of PATO sonGoku OpenFOAM Community Contributions 0 September 21, 2018 08:38
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 14:53
Running axis-symmetric case houkensjtu OpenFOAM 3 October 5, 2012 02:32
Interfoam Droplet under shear test case adona058 OpenFOAM Running, Solving & CFD 3 May 3, 2010 18:46


All times are GMT -4. The time now is 01:50.