Problem with transport properties depending on Temperature

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

 November 24, 2005, 04:35 Hello everybody, I'm actual #1 galaad Guest   Posts: n/a Hello everybody, I'm actually modifying the buoyantSimpleFoam solver in order to introduce transport coefficients depending on temperature. But I'm encountering a problem. The energy conservation is solved with the enthalpy value and I want to access to the temperature value in order to interpolate transport coefficients - like the viscosity - with the temperature. The viscosity I used is written in an external file "mu.txt" and it's tabulated with the temperature all the 100K. I've written the code like that: f=fopen("/home/fvm/OpenFOAM/fvm-1.2/run/tutorials/buoyantSimpleFoam/test/0/mu.tx t","r"); fscanf(f,"%d",&Nmu); // Reading if the total number of the value Nmu for (int i=0; i

 November 24, 2005, 07:25 Thats because T is not declare #2 Senior Member   Eugene de Villiers Join Date: Mar 2009 Posts: 725 Rep Power: 14 Thats because T is not declared in the top level code. Try thermo->T()

 November 24, 2005, 08:18 Thank you Eugene: it's work we #3 galaad Guest   Posts: n/a Thank you Eugene: it's work well.

 December 5, 2005, 13:03 Dear Frédéric LAGO: Could #4 Senior Member   Guoxiang Join Date: Mar 2009 Posts: 109 Rep Power: 10 Dear Frédéric LAGO: Could you help me see my code and errors. I think maybe, I miss some header files. Please give some advice. // set the nu for each cell 116: volScalarField& nuInternal = nu.internalField(); forAll (nuInternal, celli) { if (componentValue[celli] > 0) nuInternal[celli] = 0.3; else nuInternal[celli] = 0.1; } // set the rho for each cell 125: volScalarField& rhoInternal = rho.internalField(); forAll (rhoInternal, celli) { if (componentValue[celli] > 0) rhoInternal[celli] = 2000000; else rhoInternal[celli] = 20000; } // set the E for each cell 134: volScalarField& EInternal = E.internalField(); forAll (EInternal, celli) { if (componentValue[celli] > 0) EInternal[celli] = 7854; else EInternal[celli] = 1000; } Error as: stressedFoam.C:116: error: 'struct Foam::dimensionedScalar' has no member named 'internalField' stressedFoam.C:125: error: 'struct Foam::dimensionedScalar' has no member named 'internalField' stressedFoam.C:134: error: 'E' was not declared in this scope stressedFoam.C:134: error: 'E' previously declared here Thanks deeply, Guoxiang

 December 6, 2005, 03:59 Dear Guoxiang, line 116 try #5 galaad Guest   Posts: n/a Dear Guoxiang, line 116 try: const scalarField& nuInternal = nu.internalField(); instead of: volScalarField& nuInternal = nu.internalField(); Try the same thing line 125. Line 134 your value E is not declared or not solved in your code... Frédéric LAGO

 December 6, 2005, 13:51 Dear Frédéric LAGO: Thanks #6 Senior Member   Guoxiang Join Date: Mar 2009 Posts: 109 Rep Power: 10 Dear Frédéric LAGO: Thanks for your help. But I was also same errors. I will try again and ask for you. Thanks a lot. Guoxiang

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post gbansal OpenFOAM Running, Solving & CFD 3 November 23, 2012 17:03 Erik Siemens 0 February 18, 2009 06:18 jgaricano OpenFOAM Running, Solving & CFD 0 June 4, 2008 16:58 Jason CFX 4 December 22, 2006 20:54 cfd sutdent Main CFD Forum 2 April 29, 2004 09:41

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