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

Dynamic boundary conditions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 5, 2022, 05:40
Default Dynamic boundary conditions
  #1
New Member
 
ayman mazloum
Join Date: Jun 2022
Posts: 1
Rep Power: 0
aymanmazloum is on a distinguished road
Hello,


I have something that I am struggeling with for a long time. I want to make a heat transfer simulation where one of the boundary condition have to have a loop. This loop will update the heat transfer gradient depending on T temperature for the previous time step.


For example:


Gradient = T_previous_step - T-air


I have done something like this in the T-file:




Code:
top
 
{
    type            codedMixed;

    refValue        uniform 200;
    refGradient     uniform 0;
    valueFraction   uniform 0.5;

    name    ramp;   // name of generated BC

    code
    #{

const volScalarField& T = this->db().objectRegistry::lookupObject<volScalarField> ("T"); 

const fvMesh& mesh = patch().boundaryMesh().mesh();
        label myinlet = mesh.boundaryMesh().findPatchID("top"); 

const scalarField& Inlet_T = T.boundaryField()[myinlet]; 

const scalar Av_Inlet_T = gAverage(Inlet_T); 

        const scalar T-air = 25+273;



this->refGrad() =   Av_Inlet_T-T-air; // Unit: K/m
    #};
aymanmazloum 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
Multiphase flow - incorrect velocity on inlet Mike_Tom CFX 6 September 29, 2016 01:27
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 05:15
Velocity vector in impeller passage ngoc_tran_bao CFX 24 May 3, 2016 21:16
Difficulty In Setting Boundary Conditions Moinul Haque CFX 4 November 25, 2014 17:30
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00


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