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

chtMultiRegionFoam fvOptions set up incorrectly

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 29, 2022, 21:45
Question chtMultiRegionFoam fvOptions set up incorrectly
  #1
New Member
 
Join Date: Aug 2022
Posts: 5
Rep Power: 3
Eman Eal is on a distinguished road
Howdy,

I am attempting to use OpenFoam for my research and need to solve a system with conjugate heat transfer and turbulance. As such I was doing this tutorial,

https://www.youtube.com/watch?v=Nhhm-ZPxVRc

unfortunately after finishing the tutorial I had an error which I haven't been able to resolve. The error is as follows.

--------------------------------------------------------------------------------------

--> FOAM Warning : Creating fvModels from "constant/fvOptions"



--> FOAM FATAL IO ERROR:
keyword type is undefined in dictionary "/home/don/Downloads/heatedDuct/constant/heater/fvOptions/options"

file: /home/don/Downloads/heatedDuct/constant/heater/fvOptions/options from line 22 to line 31.

From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
in file db/dictionary/dictionary.C at line 831.

FOAM exiting
-----------------------------------------------------------------------------------------

Which appears to be reference a mistake in the fvOptions file which contains inputs that define the heat generation in the heating element.

The file in question fvOptions is this,

-----------------------------------------------------------------------------------------
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant/heater";
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

options
{
energySource
{
type scalarSemiImplicitSource;

timeStart 0;
duration 1;
selectionMode all;
volumeMode specific;

injectionRateSuSp
{
h (1e7 0); // W/m^3 == kg/m/s^3
}
}
}

// ************************************************** *********************** //

-----------------------------------------------------------------------------------------

This problem is cause because I am using version 10 while the tutorial was for a different version. The differences in the version are creating differences in how this file, and some others need to be set up. Unfortunately I haven't been able to figure out what is wrong with this.

Obviously I would like to know what is wrong with this code but mainly I am interested in how people look up the correct format for these input files, and the available options ect.
The best thing I have been able to find is the source code on the OpenFOAM website but it is rather complicated and my c++ isn't the best.
Eman Eal is offline   Reply With Quote

Old   August 30, 2022, 04:01
Default
  #2
Member
 
Join Date: Jan 2022
Location: Germany
Posts: 72
Rep Power: 4
überschwupper is on a distinguished road
Hello,


fvModels and fvConstraints were introduced in OFv9 for fvOptions. Better use the actual standards, altough backwards compatibility is available in this case.


Source: https://github.com/OpenFOAM/OpenFOAM...0da43eb452c861


Your problem remembered me of one problem that I had some time ago. I faced the same error message. I cannot remember exactly what the solution was, but I used your code into my "template" maybe this will work for you.

in constant/fvModels
Code:
energySource
{
type            scalarSemiImplicitSource;
selectionMode all;
volumeMode specific;

injectionRateSuSp
{
name h;

timeStart 0;
duration 1;
selectionMode all;
explicit 10e7;
//implicit ;{}

}
}
Maybe this will work.


Regarding your question at the end. I always use the available doxygen on cpp.openfoam.org and the source code on github. Sometimes there are examples given, otherwise you have to look it up inside the source code. but most of the time, you will find good examples inside the tutorials or on this forum and then you only have to adjust to your case.
überschwupper is offline   Reply With Quote

Old   August 30, 2022, 10:45
Default
  #3
New Member
 
Join Date: Aug 2022
Posts: 5
Rep Power: 3
Eman Eal is on a distinguished road
Thank you for your reply and advice it was helpful and the problem is fixed.
Eman Eal is offline   Reply With Quote

Reply

Tags
beginner, chtmultiregionfoam, error, fvoptions, tutorial

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
How can a lower bound for p_rgh be set in chtMultiRegionFoam? mkalont007 OpenFOAM Running, Solving & CFD 0 August 9, 2019 12:39
Ansys Licence Serve on Ubuntu 16.04 LTS david.pasquale ANSYS 2 January 20, 2017 11:52
Possible bug with stitchMesh and cyclics in OpenFoam Jack001 OpenFOAM Pre-Processing 0 May 21, 2016 08:00
[General] 2 datas on one plot Akuji ParaView 46 December 1, 2013 14:06
How to show the transient case? H.P.LIU Phoenics 7 July 13, 2010 04:31


All times are GMT -4. The time now is 00:34.