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

B.C. CodeStream does not repeat during runtime

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

Like Tree1Likes
  • 1 Post By sjafarik

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 12, 2018, 13:32
Default B.C. CodeStream does not repeat during runtime
  #1
New Member
 
MI
Join Date: Apr 2018
Posts: 4
Rep Power: 5
sjafarik is on a distinguished road
Dear Foamer,

I am using codeStream for one of my B.C.'s and the problem is it just compiles and runs the codeStream at t=0 and after that, it is not changing the B.C.

My B.C. depends on the temperature of the patch and I wrote it as a function of the temperature of the patch but the temperature doesn't update and it just takes the initial temperature and calculate the filedPatch at the beginning.

I also check it out by adding following code to see if it runs the codeStream everytime or not:

Info << "HELLO" << endl;

well it just runs it at the very beginning right after the compilation not anymore during the simulation.

Can anyone please help me to know how to make codeStream run in each iteration and/or timestep?

Thanks in advance,

P.S. I have used codedFixedValue for another B.C. and it runs in every iteration but here I am using codeStream inside directionMixed and I cannot use codedFixedValue
PanPeter likes this.
sjafarik is offline   Reply With Quote

Old   June 25, 2018, 08:04
Default
  #2
Member
 
Karelke Yu
Join Date: Dec 2014
Posts: 96
Rep Power: 8
cfdopenfoam is on a distinguished road
Quote:
Originally Posted by sjafarik View Post
Dear Foamer,

I am using codeStream for one of my B.C.'s and the problem is it just compiles and runs the codeStream at t=0 and after that, it is not changing the B.C.

My B.C. depends on the temperature of the patch and I wrote it as a function of the temperature of the patch but the temperature doesn't update and it just takes the initial temperature and calculate the filedPatch at the beginning.

I also check it out by adding following code to see if it runs the codeStream everytime or not:

Info << "HELLO" << endl;

well it just runs it at the very beginning right after the compilation not anymore during the simulation.

Can anyone please help me to know how to make codeStream run in each iteration and/or timestep?

Thanks in advance,

P.S. I have used codedFixedValue for another B.C. and it runs in every iteration but here I am using codeStream inside directionMixed and I cannot use codedFixedValue
Hi,

did u find a way to accomplish? I face the exactly same problem.
cfdopenfoam is offline   Reply With Quote

Old   June 28, 2018, 12:49
Default
  #3
New Member
 
MI
Join Date: Apr 2018
Posts: 4
Rep Power: 5
sjafarik is on a distinguished road
Quote:
Originally Posted by cfdopenfoam View Post
Hi,

did u find a way to accomplish? I face the exactly same problem.
Hi,

I finally gave up and now I am pretty sure that codeStream does NOT update during runTime. I used defining BC inside my solver Code. following threads are helpful for doing that.

Snippet for redefining fixedGradient boundary condition for a patch inside solver

Field value inside a boundary condition class
sjafarik is offline   Reply With Quote

Reply

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 to get current time using codeStream in b.c. CarlesCQL OpenFOAM Pre-Processing 0 February 28, 2016 14:09
How to get current time using codeStream in b.c. CarlesCQL OpenFOAM Programming & Development 0 February 17, 2016 11:02
Problem in3D model processing mebinitap OpenFOAM 2 December 12, 2014 04:40
runtime sample plan: how to get gradP Sylv OpenFOAM Programming & Development 5 September 17, 2013 03:35
How to set B.C. of the 2nd or 3rd type in UDS? Ray Hong FLUENT 0 December 28, 2005 06:03


All times are GMT -4. The time now is 17:39.