|
[Sponsors] |
February 22, 2011, 07:44 |
|
#21 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
It means that you are trying to solve for two variables within one equation.
|
|
February 22, 2011, 07:49 |
|
#22 |
Senior Member
Balkrishna Patankar
Join Date: Mar 2009
Location: Pune
Posts: 123
Rep Power: 17 |
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 ); |
|
July 18, 2013, 05:12 |
|
#23 |
Member
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 13 |
Hi BalKrishna
Have you found the solution for this problem. How can some body solve 2 variables here. Regards Rohith |
|
June 16, 2015, 10:10 |
|
#24 |
New Member
Sandip Wadekar
Join Date: Oct 2014
Posts: 17
Rep Power: 11 |
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]); } } } |
|
June 16, 2015, 10:18 |
|
#25 |
New Member
Sandip Wadekar
Join Date: Oct 2014
Posts: 17
Rep Power: 11 |
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]); } } } |
|
June 16, 2015, 10:41 |
|
#26 |
Member
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 13 |
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 |
|
June 16, 2015, 11:09 |
|
#27 |
New Member
Sandip Wadekar
Join Date: Oct 2014
Posts: 17
Rep Power: 11 |
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); |
|
June 18, 2015, 03:32 |
|
#28 |
New Member
Sandip Wadekar
Join Date: Oct 2014
Posts: 17
Rep Power: 11 |
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]; |
|
June 30, 2016, 17:32 |
|
#29 | |
New Member
elham usefi
Join Date: Apr 2016
Location: tabriz,iran
Posts: 13
Rep Power: 10 |
Quote:
Hi i knw this post is old but i need help on this problem in my case Cp varies in different locations, so I need to write energy equation with enthalpy. I wrote it like this: Code:
fvScalarMatrix EEqn ( fvm::div(phi, E) - fvm::laplacian(k_n/cp, E) == fvOptions(rho,E) ); EEqn.relax(); fvOptions.constrain(EEqn); EEqn.solve(); fvOptions.correct(E); T=E/cp; rhok = (1.0 - beta*(T - TRef)); can u help me? |
||
July 1, 2016, 01:09 |
|
#30 |
Member
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 13 |
Hi,
The only error i see is that you have defined enthalpy as E=cp*T But it is deltaE = cp*deltaT. Hope it helps Regards, Rohith |
|
July 3, 2016, 18:12 |
|
#31 | |
New Member
elham usefi
Join Date: Apr 2016
Location: tabriz,iran
Posts: 13
Rep Power: 10 |
Quote:
thank u for ur response but I didnt get it! if we replace E with cp*T in Code:
( fvm::div(phi, E) - fvm::laplacian(k_n/cp, E) == fvOptions(rho,E) ); Code:
( fvm::div(phiCp, T) - fvm::laplacian(k_n, T) == fvOptions(rhoCp,T) ); actually first I tried TEqn like this: Code:
( fvm::div(phiCp, T) - fvm::laplacian(k_n, T) == fvOptions(rhoCp,T) ); but when I assume that cp is constant! like this: Code:
( cp*fvm::div(phi, T) - fvm::laplacian(k_n, T) == fvOptions(rhoCp,T) ); so I tried EEqn |
||
Tags |
density, property, specific heat, temperature |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with zeroGradient wall BC for temperature - Total temperature loss | cboss | OpenFOAM | 12 | October 1, 2018 06:36 |
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 10:08 |
chemical reaction - decompostition | La S. Hyuck | CFX | 1 | May 23, 2001 00:07 |