|
[Sponsors] |
Entry 'selectionMode' not found in dictionary; CodedSource fvOptions |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Join Date: Mar 2020
Posts: 16
Rep Power: 6 ![]() |
Hello Foamers,
I want to solve a dam bream problem using interFoam. I divided the dam into certain compartments (say two). The requirement is two of them will not start flowing at the same time, say the 1st will start at t = 0 s and the 2nd will follow the 1st after 2 seconds. Well, my first question is, is there any "easy way" to do it ? My second question is I supposed to manipulate the solver using fvOptions by initiating the problem with setFields for the whole dam and constraining the cells inside the 2nd compartment until time = 2 s. Hence, I produced the following fvOptions dictionary: Code:
velocitySource { type vectorCodedSource; active yes; name velocitySource; vectorCodedSourceCoeffs { selectionMode cellSet; cellSet box1; fields (U); codeInclude #{ #}; codeCorrect # { #}; codeAddSup # { #}; codeConstrain # { const Time& time = mesh().time(); //get time const scalar startTime = 2.0; // set value upto this time cellSet selectedCells(mesh_, cellSetName_); labelList cells = selectedCells.toc (); if (time.value() <= startTime) { vector values(0, 0, 0); eqn.setValues(cells, values); } #}; code # { $ codeInclude $ codeCorrect $ codeAddSup $ codeConstrain #}; } velocitySourceCoeffs { } } HTML Code:
--> FOAM FATAL IO ERROR: (openfoam-2012) [0] Entry 'selectionMode' not found in dictionary "/mnt/d/gebray/OpenFOAM/test/dambreak/constant/fvOptions.velocitySource.velocitySourceCoeffs" [0] [0] [0] file: /mnt/d/gebray/OpenFOAM/test/dambreak/constant/fvOptions.velocitySource.velocitySourceCoeffs [0] [0] From bool Foam::dictionary::readEntry(const Foam::word&, T&, Foam::keyType::option, bool) const [with T = Foam::word] [0] in file /home/pawan/OpenFOAM/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/dictionaryTemplates.C at line 334. What did I miss? Also, who is pawan in the file path ![]() |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 ![]() ![]() |
Quote:
Code:
velocitySource { type vectorCodedSource; active yes; name velocitySource; selectionMode cellSet; cellSet box1; fields (U); ... other entries } |
||
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Join Date: Mar 2020
Posts: 16
Rep Power: 6 ![]() |
Thank you olesen.
It is working now. I was mixing both openfom.com and openfoam.org manuals. For openfoam.com (e.g OpenFOAM-v2012) your recommendation avoids the error. |
|
![]() |
![]() |
![]() |
![]() |
#4 | |
New Member
Join Date: Mar 2020
Posts: 16
Rep Power: 6 ![]() |
Quote:
Code:
cellSet box1,box2; Gebray |
||
![]() |
![]() |
![]() |
![]() |
#5 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 ![]() ![]() |
Quote:
No promises, but I think you should add this as an issue to develop.openfoam.com to keep your idea from being lost. Would give a chance to explore/discuss if your idea makes sense or how it could be added (or not). |
||
![]() |
![]() |
![]() |
![]() |
#6 | |
New Member
Join Date: Mar 2020
Posts: 16
Rep Power: 6 ![]() |
Quote:
Gebray |
||
![]() |
![]() |
![]() |
Tags |
codedsource, fvoptions |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem of compilation OF 14Allwmake command not found | erik_d | OpenFOAM Bugs | 13 | September 13, 2008 21:45 |
Regarding FoamX running Kindly help out | hariya03 | OpenFOAM Pre-Processing | 0 | April 18, 2008 04:26 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 06:51 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 04:15 |
FoamX error aachenBomb case | Ervin Adorean (Adorean) | OpenFOAM Pre-Processing | 13 | March 7, 2005 03:50 |