|
[Sponsors] |
September 24, 2010, 06:02 |
"nu" term in UEqn
|
#1 |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 16 |
1- Is how to change the "nu" in the icOFoam solver to a new one nu_new that depends on another scalarField C which also to be solved.
For example: In UEqn i have the "fvm::laplacian(nu, U)" but i need to put nu = 1-C/5; where C is another Scalarfield to be solved after PISO loop in the C_scalar_Equation: solve ( ddt(C)+div(phi,C)=div(J); ) 2-How to do if i need to define the BC for the C field, where one of the patches is (J=0), J exists in the C_scalar_Equation and it is a vectorField. 3-Does in the PISO loop , it does for just one dt, or it does it for all, so if at each time step i want to update my C, it is OK to solve C_scalar_Equation after the PISO loop, or what? thanks a lot Last edited by T.D.; September 27, 2010 at 06:02. |
|
September 24, 2010, 11:55 |
|
#2 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
1. I don't have the source handy right now but I believe fvm::laplacian can take the first argument as either a scalar or a volScalarField.
I would define nu_new as a volScalarField, according to your equation there. You will run into dimensional problems... what are the dimensions of C? If C has dimensions, you also have to give dimensions to the "1" in the 1-5/C equation. You could do an ugly work around with a dimensionless C using: Code:
// nu_new is created previously dimensionSet nu_newDims(nu_new.dimensions()); nu_new.dimensions().reset(dimless); nu_new = 1 - 5 / C; nu_new.dimensions().reset(nu_newDims); 2 - Depends on the physics. If it is a scalar, just use zeroGradient, unless it is an inlet, then use a value you expect from the freestream. 3 - Not sure what you mean. You can do anything you want just before the runTime.write(), and you shouldn't interfere with the PISO loop. |
|
September 24, 2010, 12:32 |
Hi
|
#3 | |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 16 |
Quote:
Hi really, my nu_new has the dimension of another predefined dimensionedScalar nu0, where nu_new=nu0*(1-5/C), and my C is dimensionless volScalarField, so can i multiply a dimensinedScalar term with another dimensoinless volScalarField, knowing later i am going to use the nu_new in the laplacian(nu_new,U) ?? What about using a new viscosityModel and implement it, that you advice? it is better, but if it can be solved without that it will be much more easier to me. thanks a lot |
||
September 25, 2010, 17:22 |
|
#4 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
Using appropriate titles makes me more willing to answer...
Btw, you asked the same question in another thread already.
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
September 26, 2010, 15:34 |
nu as function of another field in UEqn, + BC problem
|
#5 | |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 16 |
Hi
execuse me for my repetition in other threads, and sorry for my titles but the reason is that i am new here, and i am excited to learn anyway thanks a lot, thank you so much alberto I tried what you told me for nuEff, but i did not understand what you said about to Update nuEff? so, i attached all my code, can you please just look at, and check if ok? thanks I have another questions concerning , my term J, how can i apply a Patch for "c" but that depends on "J" value, for example BC for a wall for "c" field is [J=0] Does My "c" field" in the code, is going to be updated at each dt? Thanks a lot T.D. Quote:
Last edited by T.D.; September 26, 2010 at 18:12. Reason: add something+ |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 05:36 |
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 | wyldckat | OpenFOAM Announcements from Other Sources | 3 | September 8, 2010 06:25 |
Modified OpenFOAM Forum Structure and New Mailing-List | pete | Site News & Announcements | 0 | June 29, 2009 05:56 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 14:25 |
OpenFOAM Debian packaging current status problems and TODOs | oseen | OpenFOAM Installation | 9 | August 26, 2007 13:50 |