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

make constant parameter, used by a boundary condition, variable?

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

Like Tree1Likes
  • 1 Post By mixkats

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 3, 2021, 12:09
Default make constant parameter, used by a boundary condition, variable?
  #1
New Member
 
Katsantonis Michalis
Join Date: Dec 2017
Posts: 21
Rep Power: 5
mixkats is on a distinguished road
Greetings,


as the title says.
Specifically in my case, ideally I would want to change the value of Ta (ambient temperature) in the externalWallHeatFluxTemperature bc, which will take values from a .data timeline file.
Is that plausible?
If not, is there a way?


example:


Code:
    potWalls
    {
         type            externalWallHeatFluxTemperature;
  
         mode            coefficient;
  
         Ta              constant 300.0;
         h               constant 5.0;
         thicknessLayers (0.02 0.3 0.02);
         kappaLayers     (54.0 0.04 54.0);
  
         kappaMethod     fluidThermo;
  
         value           $internalField;
    }
mixkats is offline   Reply With Quote

Old   February 3, 2021, 12:15
Default
  #2
New Member
 
Katsantonis Michalis
Join Date: Dec 2017
Posts: 21
Rep Power: 5
mixkats is on a distinguished road
I considered using the timeVaryingUniformFixedValue bc, but I think it's not the one, as I want to simulate the heat loss through a composite wall, where the fluid temperature outside should be changing.
mixkats is offline   Reply With Quote

Old   February 4, 2021, 03:57
Default
  #3
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 241
Rep Power: 14
Yann is on a distinguished road
Hi Mixkats,

In the externalWallHeatFluxTemperature header, we can read this :
Code:
    The ambient temperature Ta is specified as a Foam::Function1 of time but
    uniform is space.
Since Ta is a "Function1" type, you can define a table to specify the Ta value as a function of time :
Code:
        Ta              table
        (
            (0 293)
            (1 303)
            (2 313)
         );
Table should also be able to read the value from a file. I did not try it myself and there might be some differences depending on the version you are using but it should work. Let us know if it solves your problem.


Cheers,
Yann
Yann is offline   Reply With Quote

Old   February 4, 2021, 10:04
Default
  #4
New Member
 
Katsantonis Michalis
Join Date: Dec 2017
Posts: 21
Rep Power: 5
mixkats is on a distinguished road
Hey Yann, thank you for your fast and enlightening reply.
It work, and I also made it read from the file "Tw.data". Let me mention that this feature of the externalWallHeatFluxTemperature, wasn't available at OF.3.1 or OF.4 , so I had to change to OF.8.


Thanks again Yann!



Code:
    potWalls
    {
         type            externalWallHeatFluxTemperature;
  
         mode            coefficient;
 
         Ta         tableFile;
         TaCoeffs
            {
                file                "Tw.data";    // name of data file
                outOfBounds         clamp;       // optional out-of-bounds handling
                interpolationScheme linear;      // optional interpolation method
            }

         h               uniform 5.0;

         thicknessLayers (0.02);//metal sheet of the cooking vessel

         kappaLayers     (14.3);//cooking vessel therm. cond.
  
         kappaMethod     fluidThermo;
  
         value           $internalField;
    }
Yann likes this.
mixkats is offline   Reply With Quote

Old   February 4, 2021, 10:56
Default
  #5
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 241
Rep Power: 14
Yann is on a distinguished road
Thanks for your feedback mixkats. I am glad to know you have been able to sort it out and I hope it will be helpful to other users!



Yann
Yann is offline   Reply With Quote

Old   February 6, 2021, 06:14
Default
  #6
New Member
 
Katsantonis Michalis
Join Date: Dec 2017
Posts: 21
Rep Power: 5
mixkats is on a distinguished road
Finally, I run the simulation, but unfortunately with the new OF version the velocity fields do not obey some fundamentals of the fluid in the mesh. In the mesh there is air fluidizing sand, which should fluidize in the minimum velocity of 0.18 m/s, from experimental data. Now it can fluidize vigorously even at 0.1 m/s, which is not very true. And unfortunately I'm not in the position to determine the perfect schemes and all that.


Is there maybe a way to insert the table with groovyBc for the specific value of Ta?
mixkats is offline   Reply With Quote

Old   February 19, 2021, 06:35
Default
  #7
New Member
 
Katsantonis Michalis
Join Date: Dec 2017
Posts: 21
Rep Power: 5
mixkats is on a distinguished road
Hello,


so I managed to get the BC running smoothly.
But finally it does not follow reality very much, at least as I would want it to.
The heat flux is appearing the opposite direction from that I want.
The fileTable for Ta gives values to Ta slightly lower than from the fluid in the mesh in each time step, so shouldn't the heat flux flow from the inside to the outside?
Is there a way to resolve this?


Code:
    potWalls
    {
         type            externalWallHeatFluxTemperature;
  
         mode            coefficient;
 
         Ta         tableFile;
         TaCoeffs
            {
                file                "Tw.data";    // name of data file
                outOfBounds         clamp;       // optional out-of-bounds handling
                interpolationScheme linear;      // optional interpolation method
            }

         h              uniform 2500;

         thicknessLayers (0.005);

         kappaLayers     (14.3);
  
         kappaMethod     fluidThermo;
  
         value           $internalField;
    }

Is it maybe the type of value I'm using ($internalField)?
mixkats is offline   Reply With Quote

Reply

Tags
boundary condition, constant, externalwallheatfluxtemp

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
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 07:30
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 06:20
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
emag beta feature: charge density charlotte CFX 4 March 22, 2011 09:14
compile errors of boundary condition "expDirectionMixed" liying02ts OpenFOAM Bugs 2 February 1, 2010 20:11


All times are GMT -4. The time now is 01:18.