Time and temperature dependent viscosity
Hi,
I am trying to simulate a time and temperature dependent viscosity. In the simulation some heat is applied to the material, when the material at some point reaches a given temperature its viscosity starts increasing at a set rate. When reaching its final viscosity it stays at this viscosity. The fluid will be stationary and just the pressure, time, temperature and viscosity of the material will be analysed. It has been suggested to me that for this simulation I should make the viscosity (Mu) a function of time and temperature, however it seems asthough there are simpler methods for implementing this such as the sutherland transport solver explained in the OpenFOAM user guide. Which would be the best method for creating this simulation and are there any other methods that may be more efficient? If anyone has any information that may help me with this simulation please let me know. I will really appreciate any help that I get with this. THANK YOU. 
I have been thinking about this and it occurred to me that this may not even be a CFD simulation, instead it may be a FEA simulation as I later planned on adding thermal expansion to it.
Is this the case or should I continue using the icoFoam solver with temperature added to it or would it be something totally different such as a reaction simulation? 
Hi sur4j,
Quoting from your other thread: Quote:
I'm not familiar with any solvers in OpenFOAM that have varying viscosity, but there are several with varying density, which usually start with the name "rho": http://www.openfoam.com/features/standardsolvers.php The solver rhoSimpleFoam is possibly the simplest one you can use as a basis for ideas. Beyond this, there is the solidMechanics solver+library kit: http://openfoamwiki.net/index.php/Co...solidMechanics Best regards, Bruno 
Hello Bruno,
Thank you for the suggestions, I will look into rhoSimpleFoam. I have spent the past few months learning some of the theory behind CFD and it has really helped me understand what I am simulating but now this simulation requires me to move into solid mechanics which I have not worked with before. I am planning on doing the same as what I had done for CFD and that is study the theory first but the majority of literature available is for FEA whereas OpenFOAM works on FVM, do you think that if I studied solid mechanics with the FEA approach I could translate much of what I learn to FVM so that it can be applied to OpenFOAM? Also, how do the solidMechanics solvers available within OpenFOAM compare with that of something such as Nastran orother commercial FEA software? 
Hi sur4j,
Quote:
Either way, FEA is known for its simulations in solid mechanics and solid thermodynamics; FVM is known for simulations with fluids + mass + heat transfer. But as I wrote before  AFAIK and I am not an expert in this field  viscosity changes during simulation are less common in CFD simulations. Quote:
Feel free to read more about it here:
Bruno 
I am still going to be studying FEA but with this simulation I think I should start off simple as you suggested with a Newtonian fluid. I have a few questions about this and also the icoFoam solver that I added temperature to.
Is implementing a dummy variable which is a function of temperature and time into OpenFOAM and Para View a difficult task? If not I could do this instead of altering the viscosity as it would give the same results. On a case such as this one where the fluid is stationary and only heat transfer is analysed how would I set the time step? This is because when fluid is moving I can use the courant number to determine the time step but in this case U=0. I had previously added temperature to the icoFoam solver. When viewing the results on para view I noticed that increasing the temperature value at the wall by modifying the BC in the 0 folder had no effect on the results, I mean that when running the my_icoFoam solver, para view showed the same rate at which heat travelled through the cavity when the temperature was set to for example 10 or 200, the only time the results changed was when the temperature diffusivity value was changed. However, when I done the same thing with the standard icoFoam solver on the case I got results that changed but they still did not seem right because when temperature was decreased the rate of heat transfer was faster. 
Hi sur4j,
Well, first of all, icoFoam is a transient solver: http://www.openfoam.com/features/standardsolvers.php Quote:
If you look at the page from the link above, you'll find this solver: Quote:
Either way, the simplest solution seems to be that you should use the solver laplacianFoam as a basis for what you want to achieve. A short description is given here: http://openfoamwiki.net/index.php/LaplacianFoam You can find similar descriptions to the other two basic solvers here: http://openfoamwiki.net/index.php/Ma...asic_CFD_codes In theory, what you want to do is to use the laplacianFoam solver as a basis for the temperature (heat) transfer over the solid and use the scalar transportation for the viscosity changes. The basis for this scalar/viscosity transport will likely be the temperature and/or time of residence of said temperature. Therefore, if study the 3 basic solvers, you should be able to figure out how to implement the simulation you want to perform. Best regards, Bruno 
hello,
Standard foam solver can already do almost what you need. Hoever the increasing viscosity rate is not here. Take a look at buoyantSimpleFoam. You can choose a polynomial thermo type for viscosity, then you get your temperature dependant viscosity. If you need to take into account the increase rate in time, you need to create your own viscosity model, which is not so difficult. Take a look at: http://www.tfd.chalmers.se/~hani/kur...nFoam%20v2.pdf regards, olivier 
Hello,
Thank you for all your help, I did not want to bump this thread until I had a new question but I am really stuck now. I have been doing as you had suggested by looking at the basic solvers and gaining a better understanding how they work I also finished reading the user guide and the finally simulated the simulation shown in the PDF Oliver had posted. I modified the simulation to work on a simpler case, this was done by making the geometry a simple block with no velocity or pressure just a temperature set at each wall, the results I obtained were very strange. The temperature was low at the wall and high at the centre which is opposite to what was set. Exactly what happened was at time step 0 the results looked correct, the wall temp was high and centre was low temperature however at time step 1 this becomes opposite, the centre becomes the high temp and the wall becomes low and then the slowly cools everything in the centre down. This has confused me a lot, I would appreciate if you could tell me if this is the wrong results or am I just reading them wrong. Also, you suggested the buoyantSimpleFoam solver for the required simulation so I ran a simulation with the cavity using this solver and noticed that it uses species, since I am working with a single material would it be better suited to use the modified SimpleFoam solver shown in the PDF or would you still suggest the buoyantSimpleFoam solver with the polynomial thermo type viscosity? Also, please note that the material I am working with is incompressible. Thank you. 
Hi sur4j,
Without more specific and concrete information, I can only guess that you didn't notice the specific units for the values in question. For example, in "polyMesh/constant/blockMeshDict", where it's possible to define a transformation factor right at the beginning of the file and not notice the 1.0 or 0.001 factor :) There is nothing as wonderfully crazy as trying to simulate a room that is 3x5... km^2 :D Best regards, Bruno 
You were correct, I changed the dimensions of the geometry to 0.5m and it worked much better. Also, I did not delete the time files when rerunning the simulation and for some reason this also caused problems with the results in para view, deleting these and modifying the geometry seemed to have solved that problem.
Thank you. 
Hello again :)
I now have another problem :( My new problem is that when I change the thermal diffusivity in the transport properties file I get no change in heat flow, this is shown in the attached images, both at the same time step, one at DT=1 and the other DT=1e05 and both look exactly the same. https://imageshack.com/i/5n33t4p https://imageshack.com/i/mhf3atp Whilst doing this I have also been playing around with solidDisplacementFoam, I should have followed your initial suggestion and went with this solver because it can already do much of what I need and making the stiffness the variable would be better suited than making viscosity vary. Thank you. 
Is there many similarities between the CFD theory that I have learnt previously and the thermal analysis in solidDisplacementFoam? I mean from my understanding there is a energy equation also used in solidDisplacementFoam to calculate the heat transfer, is this similar to the energy equation used in CFD which is derived from the mass conservation equation?
Also, could anyone please provide me with any literature or related documents for studying the solidDisplacementFoam thermal solver, such as information behind the theory of the solvers used for heat transfer and how these are discretised using the FVM. Thank you. 
Hi sur4j,
I've finally managed to answer to your post. From what I can see in the source code, this solver is considerably simple and the basis for it is possibly already documented in some CFD book. The thermal part that it has got integrated into the source code, comes from laplacianFoam: http://openfoamwiki.net/index.php/LaplacianFoam If you have a look into the section "Basic CFD codes" here: http://openfoamwiki.net/index.php/Ma...asic_CFD_codes  you'll see that this solver is one of 3 basic solvers, for which descriptions are given in the links given there. And have a look into the source code of solidDisplacementFoam, located at "$FOAM_SOLVERS/stressAnalysis/solidDisplacementFoam", or online here: https://github.com/OpenFOAM/OpenFOAM...splacementFoam Beyond this, I would say that the User Guide gives a good tutorial: http://www.openfoam.org/docs/user/plateHole.php Best regards, Bruno 
Error while building a new viscosity model..
Hi wyldckat,
I am trying to built a new viscosity model based on some scalar like alpha(concentration),T (Temperature) I have tried the following approach given below Code:
#include "alphaTLaw.H" Code:
http://www.tfd.chalmers.se/~hani/kur...nFoam%20v2.pdf I would be thankful to you if you can provide any insight on the error....:confused::confused: Thank you 
Greetings himanshu28,
"ln" in OpenFOAM stands for "symbolic link", not "natural logarithm". In C++, the natural logarithm function is named "log" and the base 10 one is "log10". Best regards, Bruno 
Quote:

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