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 Community New Posts Updated Threads Search

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: 5
Rep Power: 8
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: 11
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: 5
Rep Power: 8
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

Old   March 4, 2022, 01:48
Default
  #4
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 400
Rep Power: 19
quarkz is on a distinguished road
Hi,

I found that for me, codedFixedValue works. You can check some tutorials online.
quarkz 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
How to get current time using codeStream in b.c. CarlesCQL OpenFOAM Pre-Processing 1 July 14, 2022 06: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 08:18.