|
[Sponsors] |
June 7, 2014, 08:25 |
modifying interDyMFoam for floatingObject
|
#1 |
New Member
Join Date: Jun 2014
Posts: 7
Rep Power: 12 |
P { margin-bottom: 0.21cm; } Hi everybody,
I am new user of openfoam and I try to modify a solver interDyMFoam for calculation of the floatingObject tutorial. I have to modify only one line in the file Ueqn.H. Here there is the modification: fvVectorMatrix UEqn ( fvm::ddt(rho, U) + alpha1 * fvm::div(rhoPhi, U) + turbulence->divDevRhoReff(rho, U) ); instead of: fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) + turbulence->divDevRhoReff(rho, U) ); The file Ueqn.H is located in the interFoam folder, which also contains interDyMFoam. I tried to compile the modified solver interDyMFoam and run the calculation of the new floatingObject case. I don't know why, the calculation doesn't work. I am not sure, if I compiled the solver correctly. I dont know, if I copied the right files for interDyMFoam modification (interDyMFoam is contained in interFoam so I am confused). And I am also not sure, which files I have to change additionaly, after I add alpha1 in Ueqn.H. I hope, it is an easy question for you. Thank you for your help in advance. Elisabeth |
|
June 7, 2014, 12:20 |
|
#2 |
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 13 |
Hi Elisabeth,
first check whether you compiled modified solver correctly or not.If you complied correctly, your new solver binary should appear in the FOAM_USER_APPBIN directory. check it with: ls $FOAM_USER_APPBIN If you cant find the solver binary, compile again and post the error here. As first step, hope it helps to you. B |
|
June 7, 2014, 18:35 |
|
#3 |
New Member
Join Date: Jun 2014
Posts: 7
Rep Power: 12 |
Hello shipman,
Thank you very much for the reply. The new solver binary appears in my APPBIN file so it was compiled correctly. What can I check next? best regards Elisabeth |
|
June 8, 2014, 01:38 |
|
#4 |
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 13 |
Hi,
If the solver is correctly compiled, Then, it should run. when you run the case if it gives any error please post here. And, during compiling most probably you gave a new name to your solver isnt it? If so, you should paste this name into ControlDict file to run your case according to new solver. Did you do this? another thing is that alpha1 is calcuated in everytime step. So, as far as know you cant multiply alpha1 * fvm::div(rhoPhi, U) like this. I am not so familiar to programming, but this form seems not true. so pls also confirm how you can write this modification correctly. You check some code modifications in the forum. Baris |
|
June 8, 2014, 10:39 |
|
#5 |
New Member
Join Date: Jun 2014
Posts: 7
Rep Power: 12 |
Hello Baris,
Thank you for the answer. I copied the whole file interDyMFoam from the tutorial/multiphase file, where floatingObject case is located. I changed the name of the solver (in controlDict) and run the calculation. The problem is, that I don't get any error message. In the file floatingObject I can see only files for time 0 and 0.1. I am not sure, if the calculations are going very very very slowly or the calculation ends so after 0.1. What do you think about it? I try to find out, if my formulation alpha1 * fvm::div(rhoPhi, U) is correct but I think it is ok, because I found some similar case here: http://www.imac.unavarra.es/Cursos/A...AMWorkshop.pdf best regards Elisabeth |
|
June 11, 2014, 03:42 |
|
#6 |
Senior Member
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 13 |
Hi Elisabeth,
try to post here your initial settings, then maybe i will have some words to say...Otherwise, it is difficult to make any comment at this stage. B |
|
June 11, 2014, 04:03 |
|
#7 |
New Member
Join Date: Jun 2014
Posts: 7
Rep Power: 12 |
hi!
I try to calculate the floatingObject tutorial, like here described: http://openfoamwiki.net/index.php/Ma...bject_Tutorial The only change is the solver to ignore the convective term on air side so that the Courrant No is better, for example for the further calculation with more complicated floating object in the future. Elisabeth |
|
June 11, 2014, 09:42 |
|
#8 |
New Member
Join Date: Jun 2014
Posts: 7
Rep Power: 12 |
Hello,
I forgot to explain you, that now I know, why my floatingObject case doesn't work. It is because of the solver formulation in openfoam 2.3. I took as example the case from the slide 16 of the presentation below http://www.imac.unavarra.es/Cursos/A...AMWorkshop.pdf and multiplied the line with alpha1 (gamma is alpha in openfoam 2.3). I didn't know that the UEqn that was taken was formulated differently because it was older version of openfoam (year 2008), I show it below. old version 2.1.1 surfaceScalarField muEff ( "muEff", twoPhaseProperties.muf() + fvc::interpolate(rho*turbulence->nut()) ); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - fvm::laplacian(muEff, U) - (fvc::grad(U) & fvc::grad(muEff)) //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U)) ) & mesh.Sf())) ); UEqn.relax(); if (pimple.momentumPredictor()) { solve ( UEqn == fvc::reconstruct ( ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(a lpha1) - ghf*fvc::snGrad(rho) - fvc::snGrad(p_rgh) ) * mesh.magSf() ) ); } new version 2.3.0 fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) + turbulence->divDevRhoReff(rho, U) ); UEqn.relax(); if (pimple.momentumPredictor()) { solve ( UEqn == fvc::reconstruct ( ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(a lpha1) - ghf*fvc::snGrad(rho) - fvc::snGrad(p_rgh) ) * mesh.magSf() ) ); } So how can I overcome this problem? How can I ignore the convection term on air side to get better courant no?Now I know that my calculation runs very slowly. The deltaT is smaller and smaller like 0.00001. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure instabilities with interDyMFoam for the floatingObject case | nbadano | OpenFOAM Running, Solving & CFD | 15 | October 15, 2021 07:35 |
problems with interDyMFoam | alexm | OpenFOAM Running, Solving & CFD | 4 | March 5, 2015 16:09 |
Viscous forces (interDyMFoam) differ between OF 2.0 and later versions | maxof | OpenFOAM Running, Solving & CFD | 2 | May 30, 2013 05:17 |
interDyMFoam with GGI in 3d | stawrogin | OpenFOAM Running, Solving & CFD | 2 | January 5, 2011 03:17 |
error using interDyMFoam with kOmegaSST to simulate sloshing | anmartin | OpenFOAM Running, Solving & CFD | 0 | July 20, 2010 14:21 |