|
[Sponsors] |
rho Constructor interFoam for creating a varying rho field |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 15, 2015, 12:24 |
rho Constructor interFoam for creating a varying rho field
|
#1 |
Member
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14 |
Hello Dear Foamers
I have a simple question in interFoam in createFields.H the rho is constructed as volScalarField rho ( IOobject ( "rho", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT ), alpha1*rho1 + alpha2*rho2, alpha1.boundaryField().types() ); rho.oldTime(); my question is what do the last couple of commands do 1. alpha1.boundaryField().types() 2. rho.oldTime(); I'm trying to implement a variable rho1 and I'm comparing interFoam with compressibleInterFoam the later does not have those two commands which is why i was wondering, i have nearly 20 self made constructors which are created randomly (without knowing if i have to add somthing like blabla.oldTime(); or blabla.boundaryFiled().types() or not) |
|
April 16, 2015, 12:24 |
|
#2 |
Member
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14 |
please!
any response, suggestions ? |
|
April 17, 2015, 06:07 |
Varying rho
|
#3 |
Member
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14 |
Hello everybody
I'm working with interFoam and i want to make a varibal phase density for this task i started by constructing a volScalarField in creatFields as volScalarField rhof ( IOobject ( "rhof", runTime.timeName(), mesh, IOobject::NO_READ ), mesh ); before i put some equation instead of "mesh" but it didnt work because when i call this rhof into the library incompressibleTwoPhaseMixture.C using const volScalarField& rhof=U_.mesh().lookupObject<volScalarField>("rhof" ); so that rhof takes place of rho1 now the problem reported by terminal is that rhof is not an object of mesh this appears when i execute the case as it gives other suggestions that are useable objects and all of them are those for which in the constructor it is as the one shown above with mesh as the last line. now using this constructor shown above with mesh in the last line so that rhof can be callabe the code searches for a boundary condition for rhof am i going in the right way or should i just delete everything and give up, nah just joking. any suggestions are heartfully wellcome |
|
March 18, 2016, 16:14 |
|
#4 | |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16 |
Quote:
Any progress in this question? I have the same question. |
||
April 16, 2016, 21:28 |
|
#5 | |
Senior Member
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24 |
Quote:
Code:
42 // Need to store rho for ddt(rho, U) 43 volScalarField rho 44 ( 45 IOobject 46 ( 47 "rho", 48 runTime.timeName(), 49 mesh, 50 IOobject::READ_IF_PRESENT 51 ), 52 alpha1*rho1 + alpha2*rho2, 53 alpha1.boundaryField().types() 54 ); 55 rho.oldTime(); Regards!
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D. Research Scientist Research Center for Computational Methods (CIMEC) - CONICET/UNL Tel: 54-342-4511594 Int. 7032 Colectora Ruta Nac. 168 / Paraje El Pozo (3000) Santa Fe - Argentina. http://www.cimec.org.ar |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problems after decomposing for running | alessio.nz | OpenFOAM | 7 | March 5, 2021 05:49 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Error log | vw.cfd | OpenFOAM | 6 | August 7, 2009 06:44 |
How to set a time varying velocity field as a BC? | Mikro | OpenFOAM Pre-Processing | 5 | March 19, 2009 05:38 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |