-
-
Notifications
You must be signed in to change notification settings - Fork 122
Add partitioned-heat OpenFOAM participant with solver #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
481cb6c
Rename Heat to Heat-Flux according to naming scheme
davidscn fcf085f
Add initial field function for non-default initial conditions
davidscn 183029b
Add the OpenFOAM Neumann configuration
davidscn b0a0777
Fix shell description for initial field
davidscn bd8fc49
Add modified solver version including non-zero RHS
davidscn 07163bf
Format precice config according to our standard
davidscn ffc5ad5
Rename 'Flux' to 'Heat-Flux' in precice-config.xml
davidscn 2a7ba0d
Remove license header and write some custom text
davidscn 8da8602
Add non-saved modifications missing in the previous commit
davidscn c477cc4
Add an additional Dirichlet participant
davidscn 9442b75
Fix some typos and missing brackets
davidscn d4561cd
Add value slot in groovyBC for paraFoam reader
davidscn 545460c
Add run and clean scripts and README description
davidscn 05a00d9
Move openfoam solver in dedicated directory on the top level
davidscn db188f2
Update documentation for updated structure
davidscn d9eb122
Store generated executable in FOAM_USER_APPBIN
davidscn b30fa85
Add a comment on the heat transfer coefficient
davidscn 479d08e
Fix duplicated 'in the' in controlDict
davidscn c01e7a1
Plug everything in one script to enable easy mesh modifications
davidscn 963433d
Adjust the documentation for updated workflows
davidscn 6537a4e
Apply suggestions from Makis review
davidscn b85f577
Remove OpenFOAM header from Temperature file
davidscn bccd675
Add a changelog entry
davidscn 7e18613
Clean up cleaning files and add a solver cleaning script
davidscn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Added OpenFOAM solver as well as the participants (Dirichlet and Neumann) to our partiitoned-heat tutorial [#223](https://github.com/precice/tutorials/pull/223) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
FoamFile | ||
{ | ||
version 2.0; | ||
format ascii; | ||
class volScalarField; | ||
location "0"; | ||
object T; | ||
} | ||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // | ||
|
||
dimensions [0 0 0 1 0 0 0]; | ||
|
||
|
||
internalField uniform 0; | ||
|
||
boundaryField | ||
{ | ||
interface | ||
{ | ||
type fixedValue; | ||
value uniform 2; | ||
} | ||
|
||
DirichletBoundary | ||
{ | ||
type groovyBC; | ||
variables "val=1+pow(pos().x,2)+(3*pow(pos().y,2))+1.3*time();"; | ||
valueExpression "val"; | ||
value uniform 0; | ||
evaluateDuringConstruction 1; | ||
} | ||
|
||
defaultFaces | ||
{ | ||
type empty; | ||
} | ||
} | ||
|
||
// ************************************************************************* // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
set -e -u | ||
|
||
. ../../tools/cleaning-tools.sh | ||
|
||
clean_openfoam . |
10 changes: 10 additions & 0 deletions
10
partitioned-heat-conduction/openfoam-dirichlet/constant/transportProperties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FoamFile | ||
{ | ||
version 2.0; | ||
format ascii; | ||
class dictionary; | ||
location "constant"; | ||
object transportProperties; | ||
} | ||
|
||
DT DT [ 0 2 -1 0 0 0 0 ] 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
set -e -u | ||
|
||
blockMesh | ||
touch openfoam-dirichlet.foam | ||
./setInitialField.sh | ||
|
||
../../tools/run-openfoam.sh "$@" | ||
. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs |
8 changes: 8 additions & 0 deletions
8
partitioned-heat-conduction/openfoam-dirichlet/setInitialField.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
set -e -u | ||
|
||
# Remove the old directory and copy the uninitialized field | ||
rm -rf ./0 | ||
cp -r ./0.orig 0 | ||
# Initialize the new field | ||
funkySetFields -keepPatches -field T -expression '1+pow(pos().x,2)+(3*pow(pos().y,2))+1.3*time()' -time '0' |
58 changes: 58 additions & 0 deletions
58
partitioned-heat-conduction/openfoam-dirichlet/system/blockMeshDict
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
FoamFile | ||
{ | ||
version 2.0; | ||
format ascii; | ||
class dictionary; | ||
object blockMeshDict; | ||
} | ||
|
||
vertices | ||
( | ||
|
||
(0 0 0) | ||
(1 0 0) | ||
(1 1 0) | ||
(0 1 0) | ||
|
||
(0 0 .1) | ||
(1 0 .1) | ||
(1 1 .1) | ||
(0 1 .1) | ||
); | ||
|
||
blocks | ||
( | ||
hex (0 1 2 3 4 5 6 7) (100 100 1) simpleGrading (1 1 1) | ||
); | ||
|
||
edges | ||
( | ||
); | ||
|
||
boundary | ||
( | ||
|
||
interface | ||
{ | ||
type patch; | ||
faces | ||
( | ||
(1 2 6 5) | ||
); | ||
} | ||
|
||
DirichletBoundary | ||
{ | ||
type patch; | ||
faces | ||
( | ||
(4 7 3 0) | ||
(7 6 2 3) | ||
(4 0 1 5) | ||
); | ||
} | ||
); | ||
|
||
mergePatchPairs | ||
( | ||
); |
52 changes: 52 additions & 0 deletions
52
partitioned-heat-conduction/openfoam-dirichlet/system/controlDict
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
FoamFile | ||
{ | ||
version 2.0; | ||
format ascii; | ||
class dictionary; | ||
location "system"; | ||
object controlDict; | ||
} | ||
|
||
// Make sure you build the solver located | ||
// in ./openfoam-solver before running | ||
// the case | ||
application heatTransfer; | ||
|
||
libs ( "libgroovyBC.so" ) ; | ||
|
||
startFrom startTime; | ||
|
||
startTime 0; | ||
|
||
stopAt endTime; | ||
|
||
endTime 1; | ||
|
||
deltaT 0.1; | ||
|
||
writeControl runTime; | ||
|
||
writeInterval 0.1; | ||
|
||
purgeWrite 0; | ||
|
||
writeFormat ascii; | ||
|
||
writePrecision 6; | ||
|
||
writeCompression off; | ||
|
||
timeFormat general; | ||
|
||
timePrecision 6; | ||
|
||
runTimeModifiable false; | ||
|
||
functions | ||
{ | ||
preCICE_Adapter | ||
{ | ||
type preciceAdapterFunctionObject; | ||
libs ("libpreciceAdapterFunctionObject.so"); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
partitioned-heat-conduction/openfoam-dirichlet/system/decomposeParDict
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FoamFile { | ||
version 2.0; | ||
class dictionary; | ||
object decomposeParDict; | ||
format ascii; | ||
} | ||
|
||
numberOfSubdomains 2; | ||
|
||
method simple; | ||
|
||
simpleCoeffs | ||
{ | ||
n (2 1 1); | ||
delta 0.001; | ||
} |
40 changes: 40 additions & 0 deletions
40
partitioned-heat-conduction/openfoam-dirichlet/system/fvSchemes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
FoamFile | ||
{ | ||
version 2.0; | ||
format ascii; | ||
class dictionary; | ||
location "system"; | ||
object fvSchemes; | ||
} | ||
|
||
ddtSchemes | ||
{ | ||
default Euler; | ||
} | ||
|
||
gradSchemes | ||
{ | ||
default Gauss linear; | ||
grad(T) Gauss linear; | ||
} | ||
|
||
divSchemes | ||
{ | ||
default none; | ||
} | ||
|
||
laplacianSchemes | ||
{ | ||
default none; | ||
laplacian(DT,T) Gauss linear corrected; | ||
} | ||
|
||
interpolationSchemes | ||
{ | ||
default linear; | ||
} | ||
|
||
snGradSchemes | ||
{ | ||
default corrected; | ||
} |
24 changes: 24 additions & 0 deletions
24
partitioned-heat-conduction/openfoam-dirichlet/system/fvSolution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FoamFile | ||
{ | ||
version 2.0; | ||
format ascii; | ||
class dictionary; | ||
location "system"; | ||
object fvSolution; | ||
} | ||
|
||
solvers | ||
{ | ||
T | ||
{ | ||
solver PCG; | ||
preconditioner DIC; | ||
tolerance 1e-06; | ||
relTol 0; | ||
} | ||
} | ||
|
||
SIMPLE | ||
{ | ||
nNonOrthogonalCorrectors 2; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.