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

quick setFields question

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 30, 2015, 13:37
Exclamation quick setFields question
  #1
New Member
 
Richard Vega
Join Date: Jun 2014
Location: Texas
Posts: 12
Rep Power: 4
richard_vega is on a distinguished road
I have used setFields in the past to set variables to values inside boxes and spheres using sphereToCell and boxToCell, but now I have a different problem, and I cannot believe how frustrating it has been to find a solution:

I already have a cellSet named RadSource. I want to set the variable q to 1.0 in all cells in this cellSet. When I use a topoSetSource type that clearly does not exist, I see the list of 43 types that do exist. Among them, cellToCell looks promising for what I want to do. When I simply replace my meaningless topoSetSource to cellToCell, expecting the error to tell me how to use it, the comments are not at all helpful:

--> FOAM FATAL IO ERROR:
keyword set is undefined in dictionary ".cellToCell"

file: .cellToCell from line 37 to line 42.

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

FOAM exiting

Could someone please help me figure out how to set the value of q in the cells in this cellSet to 1.0?
richard_vega is offline   Reply With Quote

Old   November 30, 2015, 14:35
Default done
  #2
New Member
 
Richard Vega
Join Date: Jun 2014
Location: Texas
Posts: 12
Rep Power: 4
richard_vega is on a distinguished road
As is often the case, within 10 minutes of posting this question, I was able to solve the problem. For anyone else who needs the solution, it was:

cellToCell
{
set RadSource;
fieldValues
(
volScalarFieldValue q 1.0
);
}

Hope this helps someone else out there!
richard_vega is offline   Reply With Quote

Reply

Tags
celltocell, setfields, toposetsource

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unanswered question niklas OpenFOAM 2 July 31, 2013 16:03
Problems with the execution of the setFields utility. foamer OpenFOAM Pre-Processing 5 June 3, 2013 12:24
Problemas with Quick titio OpenFOAM Running, Solving & CFD 4 May 12, 2010 06:09
Please help student, quick question, CFD prices?? quiksilver Main CFD Forum 2 April 30, 2010 19:09
question on setFields fijinx OpenFOAM Running, Solving & CFD 1 February 15, 2010 16:07


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