|
[Sponsors] |
April 13, 2005, 05:13 |
I work on the solver 'interFoa
|
#1 |
Member
Luckyluke
Join Date: Mar 2009
Posts: 51
Rep Power: 17 |
I work on the solver 'interFoam'.
I want to add a few codes in it to track the interface. Initial 'Gamma' field are defined using 'setGammaDamBreak'. I store the initial interface points with array. In the code, the gamma, pd and U are updated using original VOF method. Then the interface points defined in the array are updated according to dx/dt=u,dy/dt=v, etc. The velocity u and v of the interface point is approximated using the value of the nearest cell. Unfortunately, I can only achieve oscillating interface instead of smooth one. Why? What should be modified in my code? Thank all. |
|
April 13, 2005, 12:08 |
Interpolate the U field onto y
|
#2 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
Interpolate the U field onto your interface points instead of using the cell values.
Why do you want to track the interface with marker particles? |
|
August 3, 2005, 09:06 |
Iīm checking in and out "geome
|
#3 |
Member
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17 |
Iīm checking in and out "geometricField"-objects in the object-registry on demand by using "regIOobject::checkIn()" and "regIOobject::checkOut()". That works fine.
Can anyone tell me if there is a method to check, whether a specific object is checked in or out? As I see "regIOobject::registries()" doesnīt work as it just checks the ownership and not the status. Rolando |
|
August 4, 2005, 07:11 |
you could either add a const a
|
#4 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
you could either add a const access function to the registered_ flag in regIOobject and recompile
or you can check the objectRegistry itself (access with db()) whether the object is registered: objectRegistry::foundObject(...) Why do you have to checkin/checkout manually? |
|
August 4, 2005, 08:23 |
Thanks Mattijs,
as I donīt wa
|
#5 |
Member
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17 |
Thanks Mattijs,
as I donīt want to manipulate the Foam core functionality I chose the second suggestion. The reason to checkIn/Out is: I do some averaging of the simulation results. Which fieldīs to average is runtime selectable to save both memory and disk space. Therefore I do manually checkIn/Out of the geometricFields. Rolando |
|
August 4, 2005, 09:28 |
This can be done more easily b
|
#6 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
This can be done more easily by just reading name-lists of
scalar/vector/tensor fields of the variables you want to average and adding them to the main application. Much similar to the problem being discussed in the 'pollutant dispersion...' thread. ...or have i missed something. N |
|
August 4, 2005, 09:49 |
Thanks Niklas,
I think thatīs
|
#7 |
Member
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17 |
Thanks Niklas,
I think thatīs what Iīm actually doing. I do a runtime lookup of the field names to average. I create the fields and store them in a table (not a list). As the fields should also be destroyed when they are no longer used, I (think I) need to check them out before destoying them. It seems to work. Rolando |
|
August 4, 2005, 09:54 |
The checkIn and checkOut are a
|
#8 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
The checkIn and checkOut are automated, you shouldn't need to call these functions yourself.
When you destroy the field it should check itself out of the database however checking it out yourself should not cause any problems it's just unnecessary. |
|
August 4, 2005, 10:03 |
CheckingIn is done automated.
|
#9 |
Member
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17 |
CheckingIn is done automated. I do not have to call "checkIn()".
I store the fields in a "HashPtrTable". When I destroy them by calling "HashPtrTable::erase()" the field is not checked out of the database. At least calling "objectRegistry::names()" still displays the name of the field. If I call "checkOut()" before calling "HashPtrTable::erase()" the field name doesnīt appear any longer. |
|
August 4, 2005, 10:12 |
It looks like you are creating
|
#10 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
It looks like you are creating a copy which you are deleting but leaving the original in the database.
|
|
August 4, 2005, 10:43 |
Thanks Henry
Thatīs not good.
|
#11 |
Member
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17 |
Thanks Henry
Thatīs not good. I have to check this out. Rolando |
|
August 4, 2005, 12:20 |
As you said Henry. Now it work
|
#12 |
Member
Rolando Maier
Join Date: Mar 2009
Posts: 89
Rep Power: 17 |
As you said Henry. Now it works fine.
Thanks Rolando |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Please give advice and help for the change the x y and z in U | liugx212 | OpenFOAM Running, Solving & CFD | 5 | December 19, 2005 23:45 |
Could someone please give advice? | Frank Wedburn | Main CFD Forum | 11 | September 26, 2005 14:31 |
please give me some advice. | cfd lover | Main CFD Forum | 0 | November 5, 2004 04:50 |
give me some advice about compressible LES. | Bin Li | Main CFD Forum | 3 | September 19, 2003 14:01 |
Could you give me your advice? | Kim | FLUENT | 0 | March 8, 2002 06:44 |