|
[Sponsors] | |||||
Trying to convert a Supersonic sonicFOAM case made for OFv4 to OFv7? |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Senior Member
Sultan Islam
Join Date: Dec 2015
Location: Canada
Posts: 147
Rep Power: 12 ![]() |
Hello,
So currently im adapting a 3D supersonic Case from OpenFOAM 4 to OpenFOAM 7 as sonicFoam was merged with rhoPimpleFOAM (thanks to a user for pointing that out). So far I have gotten around SurfaceFeatureExtract of stl file, blockMeshing and SnappyHexMeshing. Now the original file was set to use 8 proc, i switched it to 6 procs. Now I edited the controlDict and changed the program to rhoPimpleFoam. I also had to edit the fvSolutions from this Code:
PIMPLE
{
nOuterCorrectors 2;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
}
Code:
PIMPLE
{
nOuterCorrectors 2;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
transonic yes;
}
Is there anything else I need to change per say? Also after trying to read the all run supplied by the original case: Code:
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
application=`getApplication`
runApplication blockMesh
runApplication snappyHexMesh > snappyHexMesh.log
runApplication decomposePar
runApplication echo processor*|xargs -n 1 cp constant
runApplication nohup mpirun -np 8 sonicFoam > log -parallel &
#------------------------------------------------------------------------------
Thanks for any help you can provide. |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 875
Rep Power: 19 ![]() |
If you type
Code:
man xargs Code:
runApplication echo processor*|xargs -n 1 cp constant - "runApplication" just executes the rest of the line using the OF wrapper, that generates a log file record - very useful - "echo processor*" lists the names of each of the decomposed folders - "xargs -n 1" says run xargs, using 1 of the passed parameters (folder names) at a time - "cp constant" is the command to be processed by xargs, with ofc the parameter on the end - i.e. this expands to "cp constant <parameter>", with <parameter> replaced first by processor0, then processor 1 etc. i.e. it is copying constant to each of the decomposed processor folders. |
|
|
|
|
|
|
|
|
#3 | |
|
Senior Member
Sultan Islam
Join Date: Dec 2015
Location: Canada
Posts: 147
Rep Power: 12 ![]() |
Quote:
Also do you have any feedback on editing fvschemes and fvsolutions for converting sonicFOAM to rhoPimpleFOAM? |
||
|
|
|
||
|
|
|
#4 |
|
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 875
Rep Power: 19 ![]() |
Yes - you can do it manually. And as a check, before you commit to running the actual command, you can always preface the command with an "echo" so that it just prints the command, eg
Code:
"echo processor* | xargs -n 1 echo cp constant" Code:
cp constant processor0 cp constant processor1 .... etc. |
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is Playstation 3 cluster suitable for CFD work | hsieh | OpenFOAM | 9 | August 16, 2015 15:53 |
| Help! Supersonic flow (Library Case 911) | PattiMichelle | Phoenics | 1 | May 19, 2009 11:19 |
| looking for a test case, DES, Supersonic flow | kaarthik | Main CFD Forum | 0 | June 7, 2007 06:49 |
| Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 13:24 |
| TO CHAM.HOW I SET UP AN EASY SUPERSONIC CASE? | USERPH | Phoenics | 9 | April 3, 2005 16:07 |