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

varying cp with temperature .

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

Like Tree1Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   February 22, 2011, 08:44
Default
  #21
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 919
Rep Power: 17
akidess will become famous soon enough
It means that you are trying to solve for two variables within one equation.
akidess is offline   Reply With Quote

Old   February 22, 2011, 08:49
Default
  #22
Senior Member
 
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 122
Rep Power: 8
balkrishna is on a distinguished road
Thanks. That is clear . However a formulation like below ,
Code:
fvScalarMatrix hEqn
    (
        fvm::ddt(rho, h)
      + fvm::div(phi, h)
      - fvm::laplacian(turbulence->alphaEff(), h)
     ==
        DpDt
    );
assumes constant k . How does one program without the constant k assumption ?
balkrishna is offline   Reply With Quote

Old   July 18, 2013, 05:12
Default
  #23
Member
 
Rohith
Join Date: Oct 2012
Location: Bayreuth, Germany
Posts: 46
Rep Power: 4
RaghavendraRohith is on a distinguished road
Hi BalKrishna

Have you found the solution for this problem. How can some body solve 2 variables here.

Regards
Rohith
RaghavendraRohith is offline   Reply With Quote

Old   June 16, 2015, 10:10
Default
  #24
New Member
 
Sandip Wadekar
Join Date: Oct 2014
Posts: 6
Rep Power: 2
wadekar is on a distinguished road
Dear sir,
I am getting the error after using Foam::tanh(...)

The error is: call of overloaded ‘tanh(const int&)’ is ambiguous
c[ignCell] =1-Foam::tanh(ignSite.cells()[icelli]);

The code is:

forAll(ign.sites(), i)
{
const ignitionSite& ignSite = ign.sites()[i];

if (ignSite.igniting())
{
forAll(ignSite.cells(), icelli)
{
label ignCell = ignSite.cells()[icelli];

c[ignCell] =1-Foam::tanh(ignSite.cells()[icelli]);
}
}
}
wadekar is offline   Reply With Quote

Old   June 16, 2015, 10:18
Default
  #25
New Member
 
Sandip Wadekar
Join Date: Oct 2014
Posts: 6
Rep Power: 2
wadekar is on a distinguished road
Dear sir,
I am getting the error after using Foam::tanh(...)

The error is: call of overloaded ‘tanh(const int&)’ is ambiguous
c[ignCell] =1-Foam::tanh(ignSite.cells()[icelli]);

The code is:

forAll(ign.sites(), i)
{
const ignitionSite& ignSite = ign.sites()[i];

if (ignSite.igniting())
{
forAll(ignSite.cells(), icelli)
{
label ignCell = ignSite.cells()[icelli];

c[ignCell] =1-Foam::tanh(ignSite.cells()[icelli]);
}
}
}
wadekar is offline   Reply With Quote

Old   June 16, 2015, 10:41
Default
  #26
Member
 
Rohith
Join Date: Oct 2012
Location: Bayreuth, Germany
Posts: 46
Rep Power: 4
RaghavendraRohith is on a distinguished road
Hi Sandip,

I hope tanh in openfoam takes only a value i.e if you define a dimensionedScalar then please define its value. See that there exists no Fields. I See Ignsites is a constant, i am not sure. If you can define it so.

Best Regards,
Rohith
RaghavendraRohith is offline   Reply With Quote

Old   June 16, 2015, 11:09
Default
  #27
New Member
 
Sandip Wadekar
Join Date: Oct 2014
Posts: 6
Rep Power: 2
wadekar is on a distinguished road
Thanks Raghavendra

I have tried with the interger value 5,
but still i am getting the same error:

call of overloaded ‘tanh(int)’ is ambiguous
c[ignCell] =Foam::tanh(5);
wadekar is offline   Reply With Quote

Old   June 18, 2015, 03:32
Default
  #28
New Member
 
Sandip Wadekar
Join Date: Oct 2014
Posts: 6
Rep Power: 2
wadekar is on a distinguished road
Hello friends,
I am compile the below mention code and i am getting the error

error: ‘distance’ was not declared in this scope
c = Foam::tanh[distance];

Code:
 
pointField meshPoints(mesh.points());
       label i(0);
       
       forAll( meshPoints, kk)
       {   
        vector curPoint = meshPoints[kk];
        vector distance = curPoint - vector(0, 0, 0);
     
        i++;
    scalar dis = mag(distance);    
        Info<< "distance = " << dis << endl;
  
      }
      Info << i << "  Points are changed" << endl;
       
    volScalarField  c = Foam::tanh[distance];
wadekar is offline   Reply With Quote

Reply

Tags
density, property, specific heat, temperature

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with zeroGradient wall BC for temperature - Total temperature loss cboss OpenFOAM 10 March 5, 2015 07:57
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
monitoring point of total temperature rogbrito FLUENT 0 June 21, 2009 17:31
udf for varying inlet temperature aravind FLUENT 0 October 27, 2008 11:08
chemical reaction - decompostition La S. Hyuck CFX 1 May 23, 2001 00:07


All times are GMT -4. The time now is 09:29.