|
[Sponsors] | |||||
timeVaryingMappedFixedValue not working without headers! |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
New Member
Peter Ladefoged
Join Date: Jun 2018
Posts: 2
Rep Power: 0 ![]() |
Dear all foamers,
I am trying to surface sample the seabed pressure beneath regular progressive waves and imposing this pressure data to a new domain where a constitutive soil model is solving Biots equations for pore pressure development. I use the surface sampling utility to map the seabed pressures in the wave model as such: Code:
functions
{
surfaces1
{
type surfaces;
functionObjectLibs ("libsampling.so");
writeControl adjustableRunTime;
writeInterval 1;
enabled true;
surfaceFormat boundaryData;
fields
(
p_rgh
p
);
interpolationScheme cellPointFace;
surfaces
(
inlet
{
type patch;
patches (bottom);
triangulate false;
}
);
}
}
Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM Extend Project: Open source CFD | | \\ / O peration | Version: 1.6-ext | | \\ / A nd | Web: www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 1.6-ext-f3027b3161e4 Exec : twoSurfacePlastBiotFoam Date : Oct 12 2018 Time : 17:35:49 Host : n-62-27-21 PID : 1191 Case : /work3/s123098/soil_waveFlume_test_2 nProcs : 1 SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading soil properties Reading pore pressure field --> FOAM Serious Error : From function IOobject::readHeader(Istream&) in file db/IOobject/IOobjectReadHeader.C at line 90 Reading "/work3/s123098/soil_waveFlume_test_2/constant/boundaryData/top/0/p" at line 2 First token could not be read or is not the keyword 'FoamFile' Check header is of the form: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM Extend Project: Open source CFD | | \\ / O peration | Version: 1.6-ext | | \\ / A nd | Web: www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class scalarAverageField; location "constant/boundaryData/top/0"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // --> FOAM FATAL IO ERROR: problem while reading header for object p file: /work3/s123098/soil_waveFlume_test_2/constant/boundaryData/top/0/p at line 2. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 70. FOAM exiting Anybody has any idea how to generate output files from surface sampling with appropriate headers, without having to do this manually or set up a script? Best Regards Peter Last edited by wyldckat; October 14, 2018 at 09:35. Reason: Added [CODE][/CODE] markers |
|
|
|
|
|
|
|
|
#2 |
|
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 130 ![]() ![]() ![]() ![]() ![]() ![]() |
Quick answer: I haven't checked, but perhaps this is already fixed in foam-extend 4.0, so if perhaps the code you have in 1.6-ext were to build with foam-extend 4.0, it may solve this issue.
If not, then a possible workaround is that you rely on file inclusion instead:
__________________
|
|
|
|
|
|
|
|
|
#3 | |
|
Senior Member
|
Quote:
Hi, I met the following error Code:
--> FOAM FATAL IO ERROR:
incorrect first token, expected <int> or '(', found on line 21 the word '#include'
file: /gpfs/work1/pMI21_CivGh/kimy/solids4Foam/poroelasticity/Jengseabed/constant/boundaryData/top/40/p at line 21.
From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::List<T>&) [with T = double]
in file /cineca/prod/build/applications/openfoam-ext/4.1/openmpi--1.10.7--gnu--4.9.2/BA_WORK/foam/foam-4.1/src/foam/lnInclude/ListIO.C at line 148.
|
||
|
|
|
||
|
|
|
#4 | |
|
New Member
Justyna Salachna
Join Date: Dec 2019
Posts: 10
Rep Power: 7 ![]() |
Quote:
|
||
|
|
|
||
|
|
|
#5 |
|
Senior Member
|
||
|
|
|
|
|
|
|
#6 |
|
Senior Member
|
Hi, I found there is a way to solve this problem by executing the following script directly. But what I need is p_rgh-constant. Can I simply add something here?
Code:
patchname='ground'
newpatchname='top'
variableFoldername=patch_$patchname
variablename='p_rgh'
variaWriteName='p'
for d in ./postProcessing/toppressuredata/surface/*
do
mkdir -p ./constant/boundaryData/$newpatchname/$d/
#Write the default headline contents into the files
echo 'FoamFile
{
version 2.0;
format ascii;
class scalarAverageField;
object values;
}
// **********************************************************************//
0.0' > ./constant/boundaryData/$newpatchname/$d/$variaWriteName
#copy values from /surface folder to /boundaryData folder
cat ./postProcessing/toppressuredata/surface/$d/$variableFoldername/scalarField/$variablename >> ./constant/boundaryData/$newpatchname/$d/$variaWriteName
done
#Transfer the format of the corresponding 'points' file
echo 'FoamFile
{
version 2.0;
format ascii;
class vectorField;
object points;
}
// ******************************************************************************************//
' > ./constant/boundaryData/$patchname/points
cat ./postProcessing/toppressuredata/surface/$d/$variableFoldername/points >> ./constant/boundaryData/$newpatchname/points
#Transfer the format of the corresponding 'faces' file
echo 'FoamFile
{
version 2.0;
format ascii;
class faceList;
object faces;
}
// ******************************************************************************************//
' > ./constant/boundaryData/$patchname/faces
cat ./postProcessing/toppressuredata/surface/$d/$variableFoldername/faces >> ./constant/boundaryData/$newpatchname/faces
|
|
|
|
|
|
![]() |
| Tags |
| coupling 2 solvers, headers, surface sampling, timevaryingmappedfixedval |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| findCell() in parallel: not working if location is outside the domain | TobiWol | OpenFOAM | 0 | January 10, 2018 15:33 |
| Processor 0 not working | vishwesh | OpenFOAM Running, Solving & CFD | 0 | November 17, 2017 04:35 |
| corrupt headers in sampled data output | KTG | OpenFOAM Post-Processing | 1 | July 29, 2017 18:01 |
| DPM parallel is not working but serial is working | johnwinter | FLUENT | 1 | March 27, 2012 03:01 |
| Working directory | mgonzalo | FLUENT | 1 | November 11, 2011 11:05 |