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

Is it possible to give a wall temperature on a specific region?

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 1, 2021, 01:08
Question Is it possible to give a wall temperature on a specific region?
  #1
Member
 
Amal Chummar
Join Date: May 2021
Posts: 31
Rep Power: 4
CHUMMAR is on a distinguished road
I have created a rectangular enclosure with the left portion as solid and right portion as fluid since I am working on a problem related to conjugate heat transfer (chtMultiRegionFoam) . I have to give a hot wall side condition of 360K which is the left side wall of the solid region. Is this possible to be added in the '0/solid/T' file OR do I have to consider the left wall as a heater and give it separate boundary conditions.

I just started working on OpenFOAM and so pls forgive any mistakes i have done in code. (RED -FLUID BLUE -SOLID)

CODE:
dimensions [ 0 0 0 1 0 0 0 ];

internalField uniform 360;

boundaryField
{

inlet
{
type patch;
}

frontAndBack
{
type zeroGradient;
}

topAndBottom
{
type zeroGradient;
}

solid_to_fluid
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod solidThermo;
}
}

THANKYOU
Attached Images
File Type: jpg Screenshot from 2021-06-01 10-34-28.jpg (79.1 KB, 24 views)
CHUMMAR is offline   Reply With Quote

Old   June 2, 2021, 03:15
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,078
Rep Power: 26
Yann will become famous soon enough
Hi Amal,

If you need to specify a fixed temperature on the left wall of your solid, you need to use a fixedValue boundary condition for this wall in the file 0/solid/T.

From your post this is hard to tell but if the frontAndBack and topAndBottom boundaries are named properly, I guess the inlet boundary must be your left wall, right?

If this is right, then you have to set a fixedValue boundary condition on "inlet".

Cheers,
Yann
CHUMMAR likes this.
Yann is offline   Reply With Quote

Old   June 2, 2021, 04:21
Smile Gave fixed value on inlet
  #3
Member
 
Amal Chummar
Join Date: May 2021
Posts: 31
Rep Power: 4
CHUMMAR is on a distinguished road
Yes, as you presumed sir.....my inlet was the left side wall with rest of them being adiabatic walls. I gave 365K as a fixed value as such. I also gave a fixed value of 300K at the outlet.

This is the code I used :

Inlet file in : 0/solid/T

dimensions [ 0 0 0 1 0 0 0 ];

boundaryField
{

inlet
{
type fixedValue;
value (365 0 0);
}

frontAndBack
{
type zeroGradient;
}

topAndBottom
{
type zeroGradient;
}

solid_to_fluid
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod solidThermo;
}
}

Outlet file in 0/fluid/T :

dimensions [ 0 0 0 1 0 0 0 ];

boundaryField
{

outlet
{
type fixedValue;
value (300 0 0);
}

frontAndBack
{
type zeroGradient;
}

topAndBottom
{
type zeroGradient;
}

fluid_to_solid
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod fluidThermo;
}
}

-----------------------------------------------------------------------

After giving the parafoam command I am not able to select T and see the isotherms. If I click celltoregions this is the picture I get(attached). I am actually trying to give to Temperature conditions on the inlet and outlet and obtain isothermal contours as shown in the attached file.
Attached Images
File Type: jpg Screenshot from 2021-06-02 13-39-27.jpg (69.0 KB, 11 views)
File Type: png wanted output.PNG (165.6 KB, 7 views)
CHUMMAR is offline   Reply With Quote

Old   June 2, 2021, 05:45
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,078
Rep Power: 26
Yann will become famous soon enough
You will have to give more information in order to get some help.
Did the solver run properly? Do you have a log file?

How are you opening paraView? With paraFoam? Have you reconstructed your case before starting paraView?

In order to visualize your results in paraView, just load "fluid/internalMesh" in the "Mesh Parts" section. Then at the top of the window, in the "Time" selector, go to the latest time to be able to visualize the final result of your simulation.

From your screenshot it seems you don't have any timeStep written except "0", so it seems something is wrong.

Yann
Yann is offline   Reply With Quote

Old   June 2, 2021, 07:41
Post Yes I am using 'paraFoam' command and attached log files
  #5
Member
 
Amal Chummar
Join Date: May 2021
Posts: 31
Rep Power: 4
CHUMMAR is on a distinguished road
I have attached a picture of the way i execute the chtmultiregion command in the terminal and also have attached the log files as requested.(ZIP FILE)



Thank you a lot Sir for the help
Attached Images
File Type: jpg Screenshot from 2021-06-02 16-57-31.jpg (79.6 KB, 16 views)
File Type: jpg Screenshot from 2021-06-02 17-07-07.jpg (36.5 KB, 5 views)
Attached Files
File Type: zip LOG FILES.zip (4.8 KB, 5 views)
CHUMMAR is offline   Reply With Quote

Old   June 2, 2021, 08:44
Default
  #6
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,078
Rep Power: 26
Yann will become famous soon enough
When you run a case, it is important to have a look at the log files to check if everything went as expected.

In your case, you have an error on the decomposePar step:
Code:
--> FOAM FATAL IO ERROR: 
 keyword n is undefined in dictionary "/home/chummarvm/OpenFOAM-dev/tutorials/heatTransfer/chtMultiRegionFoam/newtest/system/fluid/decomposeParDict"

Check the file system/fluid/decomposeParDict: it must exist and be properly defined.

You don't see any result because your solver did not run and hence did not write any data. You have to fix the decomposePar first and then see if it solves your problem or if another error arises.

Cheers,
Yann
CHUMMAR likes this.
Yann is offline   Reply With Quote

Old   June 7, 2021, 02:24
Unhappy decompose ParDict
  #7
Member
 
Amal Chummar
Join Date: May 2021
Posts: 31
Rep Power: 4
CHUMMAR is on a distinguished road
I have 3 decompose ParDict files.......


One in solid, fluid and one in the system folder.


I have copied them from another chtmultiregion case without knowing the syntax



Since i am a newbie i did so as seen in tutorials.......
--------------------------------------------------------------------------------------------------------------------

CODE:
FoamFile
{
version 2.0;
format ascii;
class dictionary;
note "mesh decomposition control dictionary";
location "system";
object decomposeParDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

numberOfSubdomains 8;

method simple;

hierarchicalCoeffs
{
n (4 1 2);
delta 0.001;
order xyz;
}
-----------------------------------------------------------------------------------------


This is what I have pasted in all 3 files......to get the outputs of T, U and also isotherm plots how should i change this file



Thanks in advance
CHUMMAR
CHUMMAR is offline   Reply With Quote

Old   June 8, 2021, 03:54
Default
  #8
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,078
Rep Power: 26
Yann will become famous soon enough
Hi,

I think your problem might come from the decomposeParDict definition. You use the "simple" method, but the coefficients are defined as "hierarchicalCoeffs" instead of "simpleCoeffs".

Try updating your decomposeParDict files with either this:
Code:
numberOfSubdomains 8;

method hierarchical;

hierarchicalCoeffs
    {
        n        (4 1 2);
        delta    0.001;
        order    xyz;
    }
Or this:
Code:
numberOfSubdomains 8;

method simple;

simpleCoeffs
    {
        n        (4 1 2);
        delta    0.001;
      }

Let us know if decomposePar works fine after this.



Yann
CHUMMAR likes this.
Yann is offline   Reply With Quote

Old   June 8, 2021, 04:33
Lightbulb Corrected decompose Par file
  #9
Member
 
Amal Chummar
Join Date: May 2021
Posts: 31
Rep Power: 4
CHUMMAR is on a distinguished road
I corrected the decompose Par file as u have suggested Mr.Yann


It ran without any errors and i obtained 8 processor files from 0 to 7. (Progress )



But the problem i still have is I cannot view the Temperature plot or isotherms in the post processing.


I have attached the decompose Par file to this reply


The plot which I am trying to obtain is also attached to this mail.....
Attached Images
File Type: png wanted output.PNG (165.6 KB, 1 views)
Attached Files
File Type: zip NEW decompose Par file.zip (1.4 KB, 1 views)
CHUMMAR is offline   Reply With Quote

Old   June 8, 2021, 04:48
Default
  #10
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,078
Rep Power: 26
Yann will become famous soon enough
OK so now we have solved the decomposeParDict issue, we can move to the next step.

Do not try to rush into visualizing your results if you did not check what happened during the previous steps.

The log you posted shows this:

Code:
--> FOAM FATAL IO ERROR: 
Illegal dictionary entry or environment variable name "internalField"
Valid dictionary entries are 1(type)

file: /home/chummarvm/OpenFOAM-dev/tutorials/heatTransfer/chtMultiRegionFoam/newtest/0/fluid/T.boundaryField.fluid_to_solid from line 41 to line 41.

As long as you get Fatal errors, you will not be able to properly run your simulation. Now you have to solve this issue before moving forward.

Yann
CHUMMAR likes this.
Yann is offline   Reply With Quote

Old   June 10, 2021, 01:48
Question Syntax for file 'T' from 0/fluid/T
  #11
Member
 
Amal Chummar
Join Date: May 2021
Posts: 31
Rep Power: 4
CHUMMAR is on a distinguished road
dimensions [ 0 0 0 1 0 0 0 ];

boundaryField
{

outlet
{
type fixedValue;
value (300 0 0);
}

frontAndBack
{
type zeroGradient;
}

topAndBottom
{
type zeroGradient;
}

fluid_to_solid
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
value $internalField;
Tnbr T;
kappaMethod fluidThermo;
}
}
----------------------------------------------------------------------------------------------------


This is the syntax i was shown for region interface while going through vidz
CHUMMAR is offline   Reply With Quote

Old   June 10, 2021, 03:18
Default
  #12
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,078
Rep Power: 26
Yann will become famous soon enough
Can you post the whole file please ?
Yann is offline   Reply With Quote

Old   June 10, 2021, 03:45
Smile Sure & THANKS
  #13
Member
 
Amal Chummar
Join Date: May 2021
Posts: 31
Rep Power: 4
CHUMMAR is on a distinguished road
I have attached the 0/fluid/ files such as T U n all ]


THANKS,
CHUMMAR
Attached Files
File Type: zip Fluid files.zip (2.7 KB, 3 views)
CHUMMAR is offline   Reply With Quote

Old   June 10, 2021, 03:52
Default
  #14
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,078
Rep Power: 26
Yann will become famous soon enough
There is one line missing in your T file to initialize the internalField:

Code:
dimensions      [0 0 0 1 0 0 0];

internalField   uniform 293;//set the initial temperature of your domain here

boundaryField
{
    ...
}

There is also an error in the outlet boundary condition. You set a vector, but temperature is a scalar so you will also get an error. Here is the proper syntax:

Code:
    outlet
    {
        type            fixedValue;
        value           uniform 300;
    }
CHUMMAR likes this.
Yann is offline   Reply With Quote

Old   June 14, 2021, 00:58
Smile Made changes as suggested
  #15
Member
 
Amal Chummar
Join Date: May 2021
Posts: 31
Rep Power: 4
CHUMMAR is on a distinguished road
Thanks a lot for your valuable suggestions Sir,


I am still not able to obtain temperature contours on paraview.....not able to select T n view


I have attached the new set of log files.....


Also i started getting an error message for DecomposePar file......but not during the execution but as i was viewing within paraview........Does this have to do with the execution?
Attached Images
File Type: jpg Screenshot from 2021-06-14 10-23-24.jpg (82.5 KB, 4 views)
File Type: jpg Screenshot from 2021-06-14 10-23-30.jpg (79.5 KB, 4 views)
Attached Files
File Type: zip New log files.zip (5.1 KB, 1 views)
CHUMMAR is offline   Reply With Quote

Old   June 16, 2021, 04:30
Default
  #16
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,078
Rep Power: 26
Yann will become famous soon enough
Hi Amal,


Look at your decomposePar log, you still have an error there.



Consequently, chtMultiRegionFoam did not run. It is useless to try visualizing your results as long as your solver did not run.



Yann
CHUMMAR likes this.
Yann is offline   Reply With Quote

Old   June 20, 2021, 05:33
Question Processor 0 to 7 : Field Transfer
  #17
Member
 
Amal Chummar
Join Date: May 2021
Posts: 31
Rep Power: 4
CHUMMAR is on a distinguished road
I corrected the errors in the corresponding decomposePar file Yann Sir.

Now it is not showing any fatal errors but showing field transfer from processor 0 to 7.


Still not getting any isotherm plots in paraview though
CHUMMAR is offline   Reply With Quote

Old   June 20, 2021, 05:36
Smile Have attched new decomposePar file
  #18
Member
 
Amal Chummar
Join Date: May 2021
Posts: 31
Rep Power: 4
CHUMMAR is on a distinguished road
Forgot to attach the new decomposePar file with previous reply Sir.
Attached Files
File Type: zip newDecomposePar.zip (1.5 KB, 1 views)
CHUMMAR is offline   Reply With Quote

Old   June 20, 2021, 07:40
Default
  #19
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,078
Rep Power: 26
Yann will become famous soon enough
Great!


Then move on to the next steps and check the log files to see if there is any error or if your solver runs properly.
Yann is offline   Reply With Quote

Old   July 13, 2021, 05:35
Question inputting continuity, momentum and energy equations in openfoam CFD
  #20
Member
 
Amal Chummar
Join Date: May 2021
Posts: 31
Rep Power: 4
CHUMMAR is on a distinguished road
I am new to openfoam CFD.... I have to input continuity, momentum and energy equations into a geometrical problem containing heat transfer and obtain temperature plots. How is this possible?
CHUMMAR is offline   Reply With Quote

Reply

Tags
boundary condition t, chtmultiregionfoam


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
Continuity Equation for multicomponent simulation lordluan CFX 15 May 19, 2020 18:36
A question related to writing expression for (htc)Heat transfer coefficient Hamda CFX 11 April 17, 2020 00:57
Domain Reference Pressure and mass flow inlet boundary AdidaKK CFX 75 August 20, 2018 05:37
error message cuteapathy CFX 14 March 20, 2012 06:45
[Other] StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 04:38


All times are GMT -4. The time now is 07:44.